.vimrc

changeset 295
33d6b9519d7e
parent 294
1a4fddb78f0e
child 296
7a9c9052fe7f
equal deleted inserted replaced
294:1a4fddb78f0e 295:33d6b9519d7e
6 let on_windows=0 6 let on_windows=0
7 if has('win32') || has('win64') 7 if has('win32') || has('win64')
8 " vim in cygwin has win32 = 0 and win32unix = 1 8 " vim in cygwin has win32 = 0 and win32unix = 1
9 let on_windows=1 9 let on_windows=1
10 end 10 end
11
12 11
13 " Set up Vundle and plugins {{{ 12 " Set up Vundle and plugins {{{
14 let installed_vundle=0 13 let installed_vundle=0
15 14
16 if on_windows == 0 15 if on_windows == 0
72 71
73 Plugin 'godlygeek/tabular' 72 Plugin 'godlygeek/tabular'
74 Plugin 'tomtom/tcomment_vim' 73 Plugin 'tomtom/tcomment_vim'
75 Plugin 'tpope/vim-unimpaired' 74 Plugin 'tpope/vim-unimpaired'
76 Plugin 'tpope/vim-endwise' 75 Plugin 'tpope/vim-endwise'
77 " Plugin 'jiangmiao/auto-pairs'
78 76
79 Plugin 'vimoutliner/vimoutliner' 77 Plugin 'vimoutliner/vimoutliner'
80 78
81 Plugin 'Shougo/neocomplcache.vim' 79 Plugin 'Shougo/neocomplcache.vim'
82 Plugin 'c9s/perlomni.vim' 80 Plugin 'c9s/perlomni.vim'
88 86
89 Plugin 'asciidoc/vim-asciidoc' 87 Plugin 'asciidoc/vim-asciidoc'
90 Plugin 'vim-ruby/vim-ruby' 88 Plugin 'vim-ruby/vim-ruby'
91 Plugin 'vim-perl/vim-perl' 89 Plugin 'vim-perl/vim-perl'
92 Plugin 'yko/mojo.vim' 90 Plugin 'yko/mojo.vim'
93
94 91
95 try 92 try
96 if on_windows == 1 93 if on_windows == 1
97 source ~/_vimrc.local-pre 94 source ~/_vimrc.local-pre
98 else 95 else
113 endif 110 endif
114 endif 111 endif
115 " }}} 112 " }}}
116 113
117 114
118 " Key maps, mostly plugin stuff on F-keys {{{ 115 " Key maps {{{
119 116
120 " F1 - Unite to switch buffers 117 " F1 - Unite to switch buffers
121 nmap <silent> <F1> :Unite -auto-resize -direction=dynamicbottom buffer<CR> 118 nmap <silent> <F1> :Unite -auto-resize buffer<CR>
122 " S-F1 - Unite to switch windows or tabs 119 " S-F1 - Unite to switch windows or tabs
123 nmap <silent> <S-F1> :Unite -winheight=10 -quick-match -short-source-names window tab:no-current<CR> 120 nmap <silent> <S-F1> :Unite -quick-match -short-source-names window tab:no-current<CR>
124 nmap <silent> <A-F1> :Unite -winheight=10 session<CR> 121 nmap <silent> <A-F1> :Unite session<CR>
125 nmap <silent> <F2> :VimFilerExplorer<CR> 122 nmap <silent> <F2> :VimFilerExplorer<CR>
126 map <silent> <F4> :noh<CR> 123 map <silent> <F4> :noh<CR>
127 nmap <silent> <F5> :GundoToggle<CR> 124 nmap <silent> <F5> :GundoToggle<CR>
128 nmap <silent> <F8> :TagbarToggle<CR> 125 nmap <silent> <F8> :TagbarToggle<CR>
129 126
150 nmap <C-h> <C-w>h 147 nmap <C-h> <C-w>h
151 nmap <C-j> <C-w>j 148 nmap <C-j> <C-w>j
152 nmap <C-k> <C-w>k 149 nmap <C-k> <C-w>k
153 nmap <C-l> <C-w>l 150 nmap <C-l> <C-w>l
154 151
152 " Prefer using regexes like in code.
153 map / /\v
154 map ? ?\v
155
156 " navigate by on-screen lines
157 map j gj
158 map k gk
159 imap <down> <C-O>j
160 imap <up> <C-O>k
161
155 " clear all interestingwords with \\k since \K is ri.vim 162 " clear all interestingwords with \\k since \K is ri.vim
156 nnoremap <silent> <leader><leader>k :call UncolorAllWords()<CR> 163 nnoremap <silent> <leader><leader>k :call UncolorAllWords()<CR>
157 164
158 nnoremap <silent> <leader>gt :SignifyToggle<CR> 165 nnoremap <silent> <leader>gt :SignifyToggle<CR>
159 "}}} 166 "}}}
188 set softtabstop=2 195 set softtabstop=2
189 196
190 set backspace=indent,eol,start 197 set backspace=indent,eol,start
191 198
192 " set number 199 " set number
193 set scrolloff=4 200 set scrolloff=10
194 set ruler 201 set ruler
195 set showcmd 202 set showcmd
196 set wildmenu 203 set wildmenu
197 204
198 set tags+=.tags 205 set tags+=.tags
366 ">> Unite 373 ">> Unite
367 " call unite#filters#matcher_default#use(['matcher_fuzzy']) 374 " call unite#filters#matcher_default#use(['matcher_fuzzy'])
368 call unite#filters#sorter_default#use(['sorter_rank']) 375 call unite#filters#sorter_default#use(['sorter_rank'])
369 " let g:unite_source_history_yank_enable = 1 376 " let g:unite_source_history_yank_enable = 1
370 377
378 call unite#custom#profile('default', 'context', {'winheight': 10})
379
371 if executable('ag') 380 if executable('ag')
372 let g:unite_source_grep_command = 'ag' 381 let g:unite_source_grep_command = 'ag'
373 let g:unite_source_grep_default_opts = '--nogroup --nocolor --column' 382 let g:unite_source_grep_default_opts = '--nogroup --nocolor --column'
374 let g:unite_source_grep_recursive_opt = '' 383 let g:unite_source_grep_recursive_opt = ''
375 endif 384 endif
481 colorscheme jellybeans 490 colorscheme jellybeans
482 end 491 end
483 492
484 end 493 end
485 494
486

mercurial