vimrc 2.7 KB

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