Mercurial > dotfiles.old
comparison vimrc @ 27:d75ec1f32cae
Add folds to vimrc
author | zegervdv <zegervdv@me.com> |
---|---|
date | Sun, 30 Mar 2014 22:57:22 +0200 |
parents | 0bf5f68cf4f9 |
children | e7be1e1656d1 |
comparison
equal
deleted
inserted
replaced
26:0bf5f68cf4f9 | 27:d75ec1f32cae |
---|---|
1 " vim:fdm=marker | |
2 | |
3 " General Settings {{{ | |
1 set nocompatible | 4 set nocompatible |
2 set laststatus=2 | 5 set laststatus=2 |
3 set noshowmode | 6 set noshowmode |
4 | 7 |
5 execute pathogen#infect() | 8 execute pathogen#infect() |
69 autocmd FileType ruby set tabstop=2|set shiftwidth=2 | 72 autocmd FileType ruby set tabstop=2|set shiftwidth=2 |
70 | 73 |
71 set clipboard=unnamed | 74 set clipboard=unnamed |
72 | 75 |
73 set viminfo='10,\"100,:20,%,n~/.viminfo | 76 set viminfo='10,\"100,:20,%,n~/.viminfo |
74 | 77 " }}} |
78 " Custom remaps and tricks {{{ | |
75 " When editing a file, always jump to the last known cursor position. | 79 " When editing a file, always jump to the last known cursor position. |
76 " Don't do it for commit messages, when the position is invalid, or when | 80 " Don't do it for commit messages, when the position is invalid, or when |
77 " inside an event handler (happens when dropping a file on gvim). | 81 " inside an event handler (happens when dropping a file on gvim). |
78 autocmd BufReadPost * | 82 autocmd BufReadPost * |
79 \ if &ft != 'gitcommit' && line("'\"") > 0 && line("'\"") <= line("$") | | 83 \ if &ft != 'gitcommit' && line("'\"") > 0 && line("'\"") <= line("$") | |
105 | 109 |
106 inoremap £ \ | 110 inoremap £ \ |
107 | 111 |
108 " nnoremap <SPACE> <C-e> | 112 " nnoremap <SPACE> <C-e> |
109 | 113 |
110 | |
111 " Close Quickfix window (,qq) | |
112 " map <leader>qq :cclose<CR> | |
113 | 114 |
114 nnoremap <silent> n n:call HLNext(0.4)<cr> | 115 nnoremap <silent> n n:call HLNext(0.4)<cr> |
115 nnoremap <silent> N N:call HLNext(0.4)<cr> | 116 nnoremap <silent> N N:call HLNext(0.4)<cr> |
116 | 117 |
117 function! HLNext (blinktime) | 118 function! HLNext (blinktime) |
156 | 157 |
157 " Show trailing whitespaces | 158 " Show trailing whitespaces |
158 " exec "set listchars=tab:\uBB\uBB,trail:\uB7,nbsp:~" | 159 " exec "set listchars=tab:\uBB\uBB,trail:\uB7,nbsp:~" |
159 " set list | 160 " set list |
160 | 161 |
162 " }}} | |
163 " Plugin Settings {{{ | |
161 " Vim Math plugin; make simple calculations | 164 " Vim Math plugin; make simple calculations |
162 vmap <expr> ++ VMATH_YankAndAnalyse() | 165 vmap <expr> ++ VMATH_YankAndAnalyse() |
163 nmap ++ vip++ | 166 nmap ++ vip++ |
164 | 167 |
165 " Airline configuration | 168 " Airline configuration |
240 let g:neocomplete#sources#dictionary#dictionaries = { | 243 let g:neocomplete#sources#dictionary#dictionaries = { |
241 \ 'default' : '', | 244 \ 'default' : '', |
242 \ 'vimshell' : $HOME.'/.vimshell_hist', | 245 \ 'vimshell' : $HOME.'/.vimshell_hist', |
243 \ 'scheme' : $HOME.'/.gosh_completions' | 246 \ 'scheme' : $HOME.'/.gosh_completions' |
244 \ } | 247 \ } |
248 | |
249 " Define keyword. | |
250 if !exists('g:neocomplete#keyword_patterns') | |
251 let g:neocomplete#keyword_patterns = {} | |
252 endif | |
253 | |
254 let g:neocomplete#keyword_patterns['default'] = '\h\w*' | |
245 " Recommended key-mappings. | 255 " Recommended key-mappings. |
246 " <CR>: close popup and save indent. | 256 " <CR>: close popup and save indent. |
247 inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR> | 257 inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR> |
248 function! s:my_cr_function() | 258 function! s:my_cr_function() |
249 return neocomplete#close_popup() . "\<CR>" | 259 return neocomplete#close_popup() . "\<CR>" |
370 xmap <C-k> <Plug>(textmanip-move-up) | 380 xmap <C-k> <Plug>(textmanip-move-up) |
371 xmap <C-h> <Plug>(textmanip-move-left) | 381 xmap <C-h> <Plug>(textmanip-move-left) |
372 xmap <C-l> <Plug>(textmanip-move-right) | 382 xmap <C-l> <Plug>(textmanip-move-right) |
373 xmap <F10> <Plug>(textmanip-toggle-mode) | 383 xmap <F10> <Plug>(textmanip-toggle-mode) |
374 | 384 |
385 let g:startify_session_dir = "~/.vim/sessions" | |
386 " }}} | |
387 | |
375 " Load local vimrc | 388 " Load local vimrc |
376 if filereadable($HOME . "/.vimrc.local") | 389 if filereadable($HOME . "/.vimrc.local") |
377 source ~/.vimrc.local | 390 source ~/.vimrc.local |
378 endif | 391 endif |
379 | 392 |
380 nnoremap <Enter> o<ESC> | 393 nnoremap <Enter> o<ESC> |
381 | |
382 | |
383 let g:startify_session_dir = "~/.vim/sessions" |