1
0

vimrc 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. set vb t_vb=
  2. set backspace=indent,eol,start
  3. set incsearch
  4. set smartcase
  5. set ignorecase
  6. set hlsearch
  7. set nowrapscan
  8. set nowrap
  9. set scrolloff=5
  10. set sidescroll=1
  11. set sidescrolloff=10
  12. set tabstop=2
  13. set shiftwidth=2
  14. set expandtab
  15. set wildmode=longest:list
  16. set background=dark
  17. set spelllang=en_us
  18. set foldminlines=2
  19. set foldlevelstart=1
  20. set foldnestmax=2
  21. set modeline
  22. set keywordprg=man\ -s
  23. set mouse=
  24. set linebreak
  25. set formatoptions-=o
  26. set ruler
  27. set laststatus=1
  28. set nojoinspaces
  29. set fileformats=unix,dos,mac
  30. set t_Co=256
  31. set completeopt=menuone
  32. set tags=tags;
  33. set backupdir=$HOME/.vim_swap//,/tmp
  34. set directory=$HOME/.vim_swap//,/tmp
  35. set guicursor=
  36. map <ESC>u :nohlsearch<CR>
  37. map j gj
  38. map k gk
  39. map Q ZQ
  40. map H za
  41. map \l :w<CR>:make<CR>
  42. map - $
  43. map _ ct_
  44. map <C-n> gt
  45. map <C-p> gT
  46. map <C-h> :AS<CR>
  47. nmap <Tab> :set expandtab!<CR>:set expandtab?<CR>
  48. nmap <Insert> :set paste!<CR>:set paste?<CR>
  49. nmap <C-j> :lnext<cr>
  50. nmap <C-k> :lprevious<cr>
  51. vmap P "_dP
  52. inoremap <C-d> <C-t>
  53. inoremap <C-a> <C-d>
  54. let g:mundo_prefer_python3 = 1
  55. nnoremap U :MundoToggle<CR>
  56. let g:syntastic_python_checkers = ['pyflakes']
  57. let g:syntastic_always_populate_loc_list = 1
  58. let g:syntastic_auto_loc_list = 1
  59. let g:syntastic_check_on_open = 0
  60. let g:syntastic_check_on_wq = 0
  61. let g:syntastic_mode_map = {'mode': 'passive', 'active_filetypes': [], 'passive_filetypes': []}
  62. let g:syntastic_enable_signs = 0
  63. nmap <F11> :SyntasticCheck<cr>
  64. nmap <F12> :SyntasticReset<cr>
  65. let g:ctrlp_map = '<c-o>'
  66. let g:ctrlp_match_func = {'match': 'pymatcher#PyMatch'}
  67. filetype plugin indent on
  68. syntax on
  69. highlight Folded ctermbg=black
  70. highlight Todo ctermbg=none ctermfg=lightcyan
  71. highlight diffRemoved ctermfg=red cterm=bold
  72. highlight diffAdded ctermfg=green cterm=bold
  73. au BufNewFile,BufRead *.frag,*.vert,*.fp,*.vp,*.glsl setf glsl
  74. au BufNewFile,BufRead *.jinja2 set ft=htmldjango
  75. au BufNewFile,BufRead *.ccss set ft=clevercss
  76. au BufNewFile,BufRead *.pp set ft=puppet foldmethod=indent
  77. autocmd FileType c,cpp,perl,php,java,glsl set cindent foldmethod=syntax
  78. autocmd FileType python set autoindent foldmethod=indent
  79. autocmd FileType ruby set foldmethod=indent foldnestmax=4
  80. autocmd FileType sh set autoindent foldmethod=syntax
  81. autocmd FileType go set foldmethod=syntax foldlevel=0 foldnestmax=1
  82. autocmd FileType javascript,less,html set foldnestmax=3 formatoptions-=o
  83. autocmd FileType javascript,less set foldmethod=indent
  84. autocmd FileType tex,latex set wrap showbreak=+ spell makeprg=pdflatex\ -interaction=nonstopmode\ %
  85. autocmd FileType tf set foldmethod=indent foldlevel=0
  86. autocmd FileType html,htmldjango,sml set autoindent
  87. autocmd FileType man set nomod nolist readonly
  88. autocmd FileType man map q :q<CR>
  89. autocmd FileType diff map H zA
  90. autocmd FileType diff map L za
  91. autocmd InsertEnter * if !exists('w:last_fdm') | let w:last_fdm=&foldmethod | setlocal foldmethod=manual | endif
  92. autocmd InsertLeave,WinLeave * if exists('w:last_fdm') | let &l:foldmethod=w:last_fdm | unlet w:last_fdm | endif