-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
74 lines (54 loc) · 1.48 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
" turn off VI-compatible mode
set nocompatible
syntax enable
" enable recursive file search from current dir
set path+=**
" line number settings
set number
set relativenumber
" =============================================================================
" key mappings
" =============================================================================
let mapleader = " "
" fast vimrc editting
nnoremap <leader>ev :vsplit $MYVIMRC<cr>
nnoremap <leader>sv :source $MYVIMRC<cr>
" clean up highlighting after search
nnoremap <silent> <F2> :let @/ = ""<CR>
" handy movements between buffers
noremap <C-l> <C-w>l
noremap <C-h> <C-w>h
noremap <C-j> <C-w>j
noremap <C-k> <C-w>k
" simplify using tabs (alt(meta) + h/j)
nnoremap <M-h> gT
nnoremap <M-l> gt
nnoremap <M-t> :tabnew<cr>
nnoremap <M-q> :tabclose<cr>
" show invisible symbols
set listchars=eol:$,tab:>-,trail:~,extends:-,precedes:<
set list
" configure indent
set smartindent
" init pathgen
execute pathogen#infect()
" open Tagbar
nmap <F8> :TagbarToggle<CR>
nnoremap <F4> :grep -R <cword> * <CR>:cw <CR>
" solarized theme
set background=dark
colorscheme solarized
" highlight cursor line
set cursorline
highlight CursorLine ctermbg=0
" highlight 80 column
set colorcolumn=80
highlight ColorColumn ctermbg=0
set exrc
au FileType xml setlocal equalprg=xmllint\ --format\ --recover\ -\ 2>/dev/null
au FileType json setlocal equalprg=python\ -m\ json.tool
hi SpecialKey ctermbg=8
hi SpecialKey ctermfg=0
set expandtab
set tabstop=4
set shiftwidth=4