vimrc 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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_map = '<c-o>'
  65. let g:ctrlp_match_func = {'match': 'pymatcher#PyMatch'}
  66. let g:rust_recommended_style = 0
  67. let g:rust_fold = 1
  68. filetype plugin indent on
  69. syntax on
  70. highlight Folded ctermbg=black
  71. highlight Todo ctermbg=none ctermfg=lightcyan
  72. highlight diffRemoved ctermfg=red cterm=bold
  73. highlight diffAdded ctermfg=green cterm=bold
  74. au BufNewFile,BufRead *.frag,*.vert,*.fp,*.vp,*.glsl setf glsl
  75. au BufNewFile,BufRead *.jinja2 set ft=htmldjango
  76. au BufNewFile,BufRead *.ccss set ft=clevercss
  77. au BufNewFile,BufRead *.pp set ft=puppet foldmethod=indent
  78. autocmd FileType c,cpp,perl,php,java,glsl set cindent foldmethod=syntax
  79. autocmd FileType python set autoindent foldmethod=indent
  80. autocmd FileType ruby set foldmethod=indent foldnestmax=4
  81. autocmd FileType sh set autoindent foldmethod=syntax
  82. autocmd FileType go set foldmethod=syntax foldlevel=0 foldnestmax=1
  83. autocmd FileType javascript,less,html set foldnestmax=3 formatoptions-=o
  84. autocmd FileType javascript,less set foldmethod=indent
  85. autocmd FileType tex,latex set wrap showbreak=+ spell makeprg=pdflatex\ -interaction=nonstopmode\ %
  86. autocmd FileType tf set foldmethod=indent foldlevel=0
  87. autocmd FileType html,htmldjango,sml set autoindent
  88. autocmd FileType man set nomod nolist readonly
  89. autocmd FileType man map q :q<CR>
  90. autocmd FileType diff map H zA
  91. autocmd FileType diff map L za
  92. autocmd FileType bzl set foldmethod=indent foldnestmax=3 foldlevel=2
  93. autocmd FileType proto set foldmethod=syntax
  94. autocmd InsertEnter * if !exists('w:last_fdm') | let w:last_fdm=&foldmethod | setlocal foldmethod=manual | endif
  95. autocmd InsertLeave,WinLeave * if exists('w:last_fdm') | let &l:foldmethod=w:last_fdm | unlet w:last_fdm | endif