.vimrc 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. " wreed vimrc
  2. " vim: set foldmethod=marker:
  3. "{{{ ***** PLUGINS ***** "
  4. " Pathogen
  5. call pathogen#infect()
  6. call pathogen#helptags()
  7. " PyMode options
  8. let pymode_lint_ignore="E501,E401,E225,W191,W391,W404"
  9. " use rope code assist instead of a complete function
  10. " au FileType python inoremap <expr> <S-Space> '<C-r>=RopeCodeAssistInsertMode()<CR><C-r>=pumvisible() ? "\<lt>C-p>\<lt>Down>" : ""<CR>'
  11. " Tlist
  12. " Toggle tag list
  13. " nnoremap <C-T> :TlistToggle<CR>
  14. " Tagbar options
  15. let g:tagbar_autofocus = 1
  16. let g:tagbar_left = 1
  17. let g:tagbar_zoomwidth = 0
  18. let g:tagbar_autofocus = 1
  19. " open Tagbar automatically when viewing a supported file/files
  20. autocmd VimEnter * nested :call tagbar#autoopen(1)
  21. " Toggle Tagbar
  22. nnoremap <C-T> :TagbarToggle<CR>
  23. " }}}
  24. "{{{ ***** VIM FEATURES ***** "
  25. " allow project-specific .vimrc files
  26. set exrc
  27. set secure
  28. " allow the use of a modeline
  29. set modeline
  30. " automatically read a file if it changes outside of vim
  31. set autoread
  32. " turn ruler on
  33. set ruler
  34. " set incremental search
  35. set hlsearch
  36. set incsearch
  37. " set status line always on
  38. set laststatus=2
  39. "turn omnicomplete on
  40. filetype plugin on
  41. set omnifunc=syntaxcomplete#Complete
  42. " }}}
  43. "{{{ ***** VISUALS ***** "
  44. " set number
  45. set number
  46. set relativenumber
  47. set foldmethod=syntax
  48. set foldcolumn=3
  49. set expandtab
  50. set shiftwidth=4
  51. set softtabstop=4
  52. set autoindent
  53. set smartindent
  54. set cindent
  55. filetype plugin indent on
  56. "colorscheme carvedwoodcool
  57. colorscheme wombat256
  58. "colorscheme devbox-dark-256
  59. "set background=light
  60. "colorscheme solarized
  61. syntax on
  62. set showcmd
  63. "}}}
  64. "{{{ ***** KEY MAPPINGS ***** "
  65. " make backspace work
  66. set backspace=eol,start,indent
  67. set whichwrap+=<,>,h,l
  68. set whichwrap+=<,>,h,l
  69. set pastetoggle=<F2>
  70. nmap <F12> :mks!<CR>
  71. nnoremap <F3> :MakeRelease<CR><CR>
  72. nnoremap <F4> :MakeDebug<CR><CR>
  73. nnoremap <F5> :so ~/.vimrc<CR>
  74. " look up things in opengrok
  75. noremap <leader>K :call OpenGrok()<CR>
  76. " treat wrapped lines as multiple lines when navigating
  77. map j gj
  78. map k gk
  79. " Smart way to move between windows
  80. map <C-j> <C-W>j
  81. map <C-k> <C-W>k
  82. map <C-h> <C-W>h
  83. map <C-l> <C-W>l
  84. " }}}
  85. "{{{ ***** PROJECTS ***** "
  86. " set default project options
  87. set makeprg=rfds
  88. command! -nargs=* MakeRelease Make build release
  89. command! -nargs=* MakeDebug Make build debug
  90. " }}}
  91. "{{{ ***** FUNCTIONS ***** "
  92. " open OpenGrok in midori
  93. function! OpenGrok()
  94. :!midori http://opengrok.factset.com/source/search?defs=<cword>&project=%2Fonline%2Fmakefds<CR>
  95. endfunction
  96. " }}}
  97. "{{{ ***** COMMANDS ***** "
  98. " make todo list
  99. command! -nargs=* -complete=file Todos vimgrep /asdf:/gj *|cw
  100. "Wrapper for make sequence
  101. command! -nargs=* Make execute '!clear' | make! <args> | cw
  102. " }}}