comparison vim/vimrc @ 347:4d73159f56ca

Use pathogen as a sub-repo, plus a few Vim tweaks.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 14 Mar 2016 21:01:35 -0700
parents c44641ca37e2
children 8d68547c3660
comparison
equal deleted inserted replaced
346:67e6ade3a451 347:4d73159f56ca
40 call add(g:pathogen_disabled, 'vimroom') 40 call add(g:pathogen_disabled, 'vimroom')
41 call add(g:pathogen_disabled, 'minibufexpl') 41 call add(g:pathogen_disabled, 'minibufexpl')
42 call add(g:pathogen_disabled, 'ragtag') 42 call add(g:pathogen_disabled, 'ragtag')
43 call add(g:pathogen_disabled, 'interestingwords') 43 call add(g:pathogen_disabled, 'interestingwords')
44 44
45 " Load pathogen.
45 " Potentially add the local bundle directory. 46 " Potentially add the local bundle directory.
47 let s:pathogen_bundles = ['bundle/{}']
46 if isdirectory(s:vim_home.s:path_sep.'local') 48 if isdirectory(s:vim_home.s:path_sep.'local')
47 execute 'set runtimepath+='.s:vim_home.s:path_sep.'local' 49 "execute 'set runtimepath+='.s:vim_home.s:path_sep.'local'
48 endif 50 call add(s:pathogen_bundles, 'local/{}')
49 51 endif
50 " Load pathogen. 52 call call('pathogen#infect', s:pathogen_bundles)
51 "call pathogen#infect() 53 "call pathogen#runtime_append_all_bundles()
52 call pathogen#runtime_append_all_bundles()
53 54
54 " Hide the toolbar in MacVim/gVIM, and set a nice window size. 55 " Hide the toolbar in MacVim/gVIM, and set a nice window size.
55 if has("gui_running") && !exists('g:resourcing_vimrc') 56 if has("gui_running") && !exists('g:resourcing_vimrc')
56 set guioptions=-t 57 set guioptions=-t
57 set lines=999 58 set lines=999
379 augroup END 380 augroup END
380 381
381 augroup VimRCFileType_c 382 augroup VimRCFileType_c
382 au! 383 au!
383 autocmd FileType c,c++,cpp setlocal foldmethod=syntax 384 autocmd FileType c,c++,cpp setlocal foldmethod=syntax
385 autocmd FileType c,c++,cpp setlocal colorcolumn=120
384 augroup END 386 augroup END
385 387
386 augroup VimRCFileType_css 388 augroup VimRCFileType_css
387 au! 389 au!
388 autocmd BufNewFile,BufRead *.less setlocal filetype=less 390 autocmd BufNewFile,BufRead *.less setlocal filetype=less
478 480
479 " Toggle spell check according to current keyboard layout. 481 " Toggle spell check according to current keyboard layout.
480 nnoremap <C-l>s :call <SID>ToggleSpellCheck()<cr> 482 nnoremap <C-l>s :call <SID>ToggleSpellCheck()<cr>
481 483
482 " Simple way to close a buffer without closing the window. 484 " Simple way to close a buffer without closing the window.
483 nnoremap <leader>bd :bprevious<cr>:bdelete #<cr> 485 nnoremap <leader>d :bprevious<cr>:bdelete #<cr>
484 486
485 " Use sane regexes. 487 " Use sane regexes.
486 nnoremap / /\v 488 nnoremap / /\v
487 vnoremap / /\v 489 vnoremap / /\v
488 490