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.

144 lines
5.0 KiB

  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. set visualbell
  10. set t_vb=
  11. " aesthetics
  12. syntax enable " enable syntax processing
  13. set scrolloff=4 " always show 5 lines above/below cursor
  14. set sidescrolloff=5 " always show 5 chars over
  15. set display=lastline " show as much as possible, no @s
  16. set colorcolumn=80 " show bar at column # as a guide (pep8)
  17. set noshowmode " no need to show mode, we have a status line
  18. " tabs
  19. set expandtab " make any tabs into spaces
  20. set tabstop=4 " turn them into 4 spaces
  21. set softtabstop=4 " even in insert mode
  22. set shiftwidth=4 " also 4 spaces for <</>> indenting
  23. " interface
  24. set nowrap " never wrap long lines
  25. set number " show line numbers
  26. set relativenumber " show numbers relative to current line
  27. set cursorline " highlight currently selected line
  28. set wildmenu " command autocomplete bar
  29. "set lazyredraw " redraw only when needed
  30. set showmatch " highlight matching brackets/parens
  31. set incsearch " real-time searching while typing
  32. set hlsearch " highlight search matches
  33. set autoindent " auto-match surrounding indentation for newlines
  34. set backspace=indent,start " let backspace delete autoindent, not eol
  35. " folding
  36. set foldenable " turn on vim folding
  37. set foldnestmax=8 " stay out of fold-hell, only 10-deep
  38. set foldmethod=indent " unless told otherwise, fold on indents
  39. " set Vundle runtime path and initialize
  40. set rtp+=~/.vim/bundle/vundle
  41. call vundle#begin()
  42. " Plugins for Vundle to handle
  43. Plugin 'VundleVim/Vundle.vim' " handle Vundle itself
  44. Plugin 'fholgado/minibufexpl.vim' " mini-buffer explorer (tabs at top)
  45. Plugin 'itchyny/lightline.vim' " status bar replacement
  46. Plugin 'maximbaz/lightline-ale' " add ale info to lightline
  47. Plugin 'Lokaltog/vim-distinguished.git' " ancient color-scheme, should replace
  48. Plugin 'scrooloose/nerdtree.git' " file explorer
  49. Plugin 'ervandew/supertab.git' " override tab function
  50. Plugin 'nvie/vim-flake8.git' " flake-8
  51. Plugin 'kien/rainbow_parentheses.vim.git'
  52. Plugin 'hynek/vim-python-pep8-indent'
  53. Plugin 'tmhedberg/SimpylFold'
  54. Plugin 'w0rp/ale'
  55. Plugin 'vimwiki/vimwiki.git'
  56. Plugin 'chrisbra/csv.vim'
  57. Plugin 'davidhalter/jedi-vim'
  58. " end vundle setup
  59. call vundle#end()
  60. colorscheme distinguished " such colours
  61. " autocmd check
  62. if has("autocmd")
  63. filetype plugin indent on " enable filetype detection
  64. " set filetypes in odd extensions for decent highlighting
  65. autocmd BufNewFile,BufRead *.djhtml set filetype=html
  66. autocmd BufNewFile,BufRead *.raml set filetype=yaml
  67. autocmd BufNewFile,BufRead *.rst set filetype=rust
  68. autocmd BufNewFile,BufRead *.cls set filetype=apexcode
  69. " for rainbow parentheses plugin
  70. autocmd VimEnter * RainbowParenthesesToggle
  71. autocmd Syntax * RainbowParenthesesLoadRound
  72. autocmd Syntax * RainbowParenthesesLoadSquare
  73. autocmd Syntax * RainbowParenthesesLoadBraces
  74. endif
  75. " [COMMANDS]
  76. " close html/xml tags with a hotkey
  77. imap ,/ </<C-X><C-O>
  78. " turn off search-highlighting
  79. nnoremap <leader><space> :nohlsearch<CR>
  80. " highlight last inserted text
  81. nnoremap gV `[v`]
  82. " don't be a noob - disable arrow keys everywhere
  83. map <up> <nop>
  84. map <down> <nop>
  85. map <left> <nop>
  86. map <right> <nop>
  87. imap <up> <nop>
  88. imap <down> <nop>
  89. imap <left> <nop>
  90. imap <right> <nop>
  91. " [PLUGIN COMMANDS]
  92. " show nerd-tree bar
  93. nmap <leader>e :NERDTreeToggle<CR>
  94. " validate xml
  95. nmap <leader>; :%w !xmllint --valid --noout -
  96. " navigate ALE errors
  97. nmap <silent> <C-k> <Plug>(ale_previous_wrap)
  98. nmap <silent> <C-j> <Plug>(ale_next_wrap)
  99. " [Ale Settings]
  100. let g:ale_completion_enabled = 1
  101. let g:ale_echo_msg_format = '[%linter%] %s'
  102. let g:ale_fixers = {
  103. \'python': ['yapf', 'autopep8', 'isort'],
  104. \}
  105. let g:lightline = {
  106. \'colorscheme': 'default',
  107. \'component_expand': {
  108. \'linter_warnings': 'lightline#ale#warnings',
  109. \'linter_errors': 'lightline#ale#errors',
  110. \'linter_ok': 'lightline#ale#ok',
  111. \},
  112. \'component_type': {
  113. \'linter_warnings': 'warning',
  114. \'linter_errors': 'error',
  115. \},
  116. \'active': {
  117. \'right': [['lineinfo'],['percent'],['fileformat', 'fileencoding', 'filetype'],['linter_errors', 'linter_warnings', 'linter_ok']]
  118. \},
  119. \}