.vimrc 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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 incsearch
  36. " set status line always on
  37. set laststatus=2
  38. " }}}
  39. "{{{ ***** VISUALS ***** "
  40. " set number
  41. set relativenumber
  42. set foldmethod=syntax
  43. set foldcolumn=3
  44. set expandtab
  45. set shiftwidth=4
  46. set softtabstop=4
  47. set autoindent
  48. set smartindent
  49. set cindent
  50. filetype plugin indent on
  51. colorscheme carvedwoodcool
  52. syntax on
  53. set showcmd
  54. "}}}
  55. "{{{ ***** KEY MAPPINGS ***** "
  56. " make backspace work
  57. set backspace=eol,start,indent
  58. set whichwrap+=<,>,h,l
  59. set whichwrap+=<,>,h,l
  60. set pastetoggle=<F2>
  61. nmap <F12> :mks!<CR>
  62. nnoremap <F3> :make! build release
  63. nnoremap <F4> :make! build debug
  64. " look up things in opengrok
  65. noremap <leader>K :call OpenGrok()<CR>
  66. " treat wrapped lines as multiple lines when navigating
  67. map j gj
  68. map k gk
  69. " Smart way to move between windows
  70. map <C-j> <C-W>j
  71. map <C-k> <C-W>k
  72. map <C-h> <C-W>h
  73. map <C-l> <C-W>l
  74. " }}}
  75. "{{{ ***** PROJECTS ***** "
  76. " set default project options
  77. set makeprg=rakefds
  78. " }}}
  79. "{{{ ***** FUNCTIONS ***** "
  80. " open OpenGrok in midori
  81. function! OpenGrok()
  82. :!midori http://opengrok.factset.com/source/search?defs=<cword>&project=%2Fonline%2Fmakefds<CR>
  83. endfunction
  84. " }}}
  85. "{{{ ***** COMMANDS ***** "
  86. " make todo list
  87. command -nargs=* -complete=file Todos vimgrep /asdf:/gj *|cw