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.

111 lines
2.7 KiB

  1. " statusline & pathogen loading
  2. set statusline =%f\ %h%m%r\ -\ buf#:\ %n\ %=%{fugitive#statusline()}\ \ line:\ %l/%L\ -\ col:\ %c%V\ \
  3. execute pathogen#infect()
  4. set binary " tbh don't remember why
  5. " indentation
  6. set autoindent
  7. set smartindent
  8. set tabstop=4
  9. set et
  10. set shiftwidth=4
  11. set backspace=2
  12. " syntax basics
  13. syntax on
  14. filetype plugin on
  15. " line numbers
  16. set number
  17. set relativenumber
  18. " search settings
  19. set hlsearch
  20. set incsearch
  21. set ignorecase
  22. set smartcase
  23. au InsertEnter * set nohlsearch
  24. au InsertLeave * set hlsearch
  25. "split location defaults
  26. set splitbelow
  27. set splitright
  28. " enforce hjkl movement
  29. noremap <Up> <NOP>
  30. noremap <Down> <NOP>
  31. noremap <Left> <NOP>
  32. noremap <Right> <NOP>
  33. " lagniappe
  34. set laststatus=2
  35. set t_Co=256
  36. source ~/.regexlist.vim
  37. set ruler
  38. set wildmenu
  39. au Filetype html setlocal tabstop=2 shiftwidth=2
  40. " au BufRead,BufNewFile *.less set filetype=css "only if no less highlighting :P
  41. au BufRead,BufNewFile *.swig set filetype=htmldjango
  42. " django/mybox specific
  43. au Filetype htmldjango setlocal tabstop=2 shiftwidth=2
  44. au Filetype css setlocal tabstop=2 shiftwidth=2
  45. au Filetype scss setlocal tabstop=2 shiftwidth=2
  46. au Filetype javascript setlocal tabstop=2 shiftwidth=2
  47. " pylint chokes a bit on django :(
  48. " let g:syntastic_python_pylint_args = "--load-plugins django_pylint"
  49. "let g:ale_python_pylint_options = '--load-plugins pylint_django'
  50. " always populate error list for :lnext, :lprev
  51. " let g:syntastic_always_populate_loc_list = 1
  52. " correctly highlight JSX in .js files
  53. let g:jsx_ext_required = 0
  54. " use eslint, not jshint
  55. " let g:syntastic_javascript_checkers = ['eslint']
  56. let g:ale_linters = {
  57. \ 'javascript': ['eslint'],
  58. \ 'python': ['flake8'],
  59. \}
  60. " Tell vim to remember certain things when we exit
  61. " '20 : marks will be remembered for up to 20 previously edited files
  62. " "100 : will save up to 100 lines for each register
  63. " :20 : up to 20 lines of command-line history will be remembered
  64. " % : saves and restores the buffer list
  65. " n... : where to save the viminfo files
  66. set viminfo='20,\"100,:20,%,n~/.viminfo
  67. " actual stuff that does the cursor-position mambo
  68. function! ResCur()
  69. if line("'\"") <= line("$")
  70. normal! g`"
  71. return 1
  72. endif
  73. endfunction
  74. " do the cursor-position mambo
  75. augroup resCur
  76. autocmd!
  77. autocmd BufWinEnter * call ResCur()
  78. augroup END
  79. set background=light
  80. colorscheme solarized
  81. " deploy shortcut
  82. command DW w | AsyncRun deploy water
  83. nnoremap ; :
  84. vnoremap ; :
  85. " aurora/vesper specific - notebook md template
  86. au BufNewFile /home/noah/projects/notebook/**.md r /home/noah/.vim/templates/notes.md
  87. " vimwiki settings
  88. au Filetype vimwiki setlocal tabstop=2 shiftwidth=2 background=dark
  89. au Filetype vimwiki colorscheme gruvbox
  90. let g:vimwiki_list = [{'path':'~/wiki/','path_html':'~/wiki_export/','syntax':'markdown'}]