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.

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