The aptly named.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
4.5 KiB

12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
  1. " system stuff
  2. filetype off " for now, enabled after Vundle
  3. set nocompatible " disable vi compatibility
  4. set shell=/bin/bash " set our shell, always bash
  5. set laststatus=2 " always show a status-bar
  6. set encoding=utf-8 " always be unicode-ing
  7. set hidden " hide abandoned buffers, don't close
  8. set mouse=a " enable mouse support everywhere
  9. " aesthetics
  10. syntax enable " enable syntax processing
  11. set scrolloff=4 " always show 5 lines above/below cursor
  12. set sidescrolloff=5 " always show 5 chars over
  13. set display=lastline " show as much as possible, no @s
  14. set colorcolumn=80 " show bar at column # as a guide (pep8)
  15. " tabs
  16. set expandtab " make any tabs into spaces
  17. set tabstop=4 " turn them into 4 spaces
  18. set softtabstop=4 " even in insert mode
  19. set shiftwidth=4 " also 4 spaces for <</>> indenting
  20. " interface
  21. set nowrap " never wrap long lines
  22. set number " show line numbers
  23. set relativenumber " show numbers relative to current line
  24. set cursorline " highlight currently selected line
  25. set wildmenu " command autocomplete bar
  26. set lazyredraw " redraw only when needed
  27. set showmatch " highlight matching brackets/parens
  28. set incsearch " real-time searching while typing
  29. set hlsearch " highlight search matches
  30. set autoindent " auto-match surrounding indentation for newlines
  31. set backspace=indent,start " let backspace delete autoindent, not eol
  32. " folding
  33. set foldenable " turn on vim folding
  34. set foldnestmax=8 " stay out of fold-hell, only 10-deep
  35. set foldmethod=indent " unless told otherwise, fold on indents
  36. " set Vundle runtime path and initialize
  37. set rtp+=~/.vim/bundle/Vundle.vim
  38. call vundle#begin()
  39. " Plugins for Vundle to handle
  40. Plugin 'VundleVim/Vundle.vim' " handle Vundle itself
  41. Plugin 'fholgado/minibufexpl.vim' " mini-buffer explorer (tabs at top)
  42. Plugin 'itchyny/lightline.vim' " status bar replacement
  43. Plugin 'Lokaltog/vim-distinguished.git' " ancient color-scheme, should replace
  44. Plugin 'scrooloose/nerdtree.git'
  45. Plugin 'ervandew/supertab.git'
  46. Plugin 'nvie/vim-flake8.git'
  47. Plugin 'kien/rainbow_parentheses.vim.git'
  48. Plugin 'hynek/vim-python-pep8-indent'
  49. Plugin 'tmhedberg/SimpylFold'
  50. Plugin 'vim-syntastic/syntastic'
  51. Plugin 'ejholmes/vim-forcedotcom'
  52. Plugin 'LokiChaos/vim-tintin.git'
  53. Plugin 'rust-lang/rust.vim'
  54. " end vundle setup
  55. call vundle#end()
  56. colorscheme distinguished " such colours
  57. " autocmd check
  58. if has("autocmd")
  59. filetype plugin indent on " enable filetype detection
  60. " \8 to run Flake8 on python files
  61. autocmd FileType python map <buffer> <leader>8 :call Flake8()<CR>
  62. " set filetypes in odd extensions for decent highlighting
  63. autocmd BufNewFile,BufRead *.djhtml set filetype=html
  64. autocmd BufNewFile,BufRead *.raml set filetype=yaml
  65. autocmd BufNewFile,BufRead *.rs set filetype=rust
  66. autocmd BufNewFile,BufRead *.cls set filetype=apex
  67. autocmd BufNewFile,BufRead *.tt,*.tin set filetype=tt
  68. " for rainbow parentheses plugin
  69. autocmd VimEnter * RainbowParenthesesToggle
  70. autocmd Syntax * RainbowParenthesesLoadRound
  71. autocmd Syntax * RainbowParenthesesLoadSquare
  72. autocmd Syntax * RainbowParenthesesLoadBraces
  73. endif
  74. " [COMMANDS]
  75. " close html/xml tags with a hotkey
  76. imap ,/ </<C-X><C-O>
  77. " turn off search-highlighting
  78. nnoremap <leader><space> :nohlsearch<CR>
  79. " highlight last inserted text
  80. nnoremap gV `[v`]
  81. " show invisible characters
  82. nmap <leader>l :set list!<CR>
  83. set listchars=tab:▸\ ,eol
  84. " don't be a noob - disable arrow keys everywhere
  85. map <up> <nop>
  86. map <down> <nop>
  87. map <left> <nop>
  88. map <right> <nop>
  89. imap <up> <nop>
  90. imap <down> <nop>
  91. imap <left> <nop>
  92. imap <right> <nop>
  93. " [PLUGIN COMMANDS]
  94. " show nerd-tree bar
  95. nmap <leader>e :NERDTreeToggle<CR>
  96. " validate xml
  97. nmap <leader>; :%w !xmllint --valid --noout -
  98. " [Syntastic Settings]
  99. set statusline+=%#warningmsg#
  100. set statusline+=%{SyntasticStatuslineFlag()}
  101. set statusline+=%*
  102. let g:syntastic_always_populate_loc_list = 1
  103. let g:syntastic_auto_loc_list = 1
  104. let g:syntastic_check_on_open = 1
  105. let g:syntastic_check_on_wq = 0
  106. let g:syntastic_loc_list_height = 3