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.

121 lines
4.4 KiB

7 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 'w0rp/ale'
  51. " Plugin 'vim-syntastic/syntastic'
  52. " end vundle setup
  53. call vundle#end()
  54. colorscheme distinguished " such colours
  55. " autocmd check
  56. if has("autocmd")
  57. filetype plugin indent on " enable filetype detection
  58. " \8 to run Flake8 on python files
  59. autocmd FileType python map <buffer> <leader>8 :call Flake8()<CR>
  60. " set filetypes in odd extensions for decent highlighting
  61. autocmd BufNewFile,BufRead *.djhtml set filetype=html
  62. autocmd BufNewFile,BufRead *.raml set filetype=yaml
  63. autocmd BufNewFile,BufRead *.rst set filetype=rust
  64. autocmd BufNewFile,BufRead *.cls set filetype=apex
  65. " for rainbow parentheses plugin
  66. autocmd VimEnter * RainbowParenthesesToggle
  67. autocmd Syntax * RainbowParenthesesLoadRound
  68. autocmd Syntax * RainbowParenthesesLoadSquare
  69. autocmd Syntax * RainbowParenthesesLoadBraces
  70. endif
  71. " [COMMANDS]
  72. " close html/xml tags with a hotkey
  73. imap ,/ </<C-X><C-O>
  74. " turn off search-highlighting
  75. nnoremap <leader><space> :nohlsearch<CR>
  76. " highlight last inserted text
  77. nnoremap gV `[v`]
  78. " show invisible characters
  79. nmap <leader>l :set list!<CR>
  80. set listchars=tab:▸\ ,eol
  81. " don't be a noob - disable arrow keys everywhere
  82. map <up> <nop>
  83. map <down> <nop>
  84. map <left> <nop>
  85. map <right> <nop>
  86. imap <up> <nop>
  87. imap <down> <nop>
  88. imap <left> <nop>
  89. imap <right> <nop>
  90. " [PLUGIN COMMANDS]
  91. " show nerd-tree bar
  92. nmap <leader>e :NERDTreeToggle<CR>
  93. " validate xml
  94. nmap <leader>; :%w !xmllint --valid --noout -
  95. " [Syntastic Settings]
  96. set statusline+=%#warningmsg#
  97. set statusline+=%{SyntasticStatuslineFlag()}
  98. set statusline+=%*
  99. let g:syntastic_always_populate_loc_list = 1
  100. let g:syntastic_auto_loc_list = 1
  101. let g:syntastic_check_on_open = 1
  102. let g:syntastic_check_on_wq = 0
  103. let g:syntastic_loc_list_height = 3