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.

131 lines
2.6 KiB

7 years ago
  1. set shell=/bin/bash
  2. set nocompatible
  3. set laststatus=2
  4. set encoding=utf-8
  5. filetype off
  6. " autocmd
  7. if has("autocmd")
  8. " enable file type detection
  9. "filetype on
  10. filetype indent on
  11. filetype plugin on
  12. set ofu=syntaxcomplete#Complete
  13. autocmd FileType python map <buffer> <leader>8 :call Flake8()<CR>
  14. endif
  15. " basic options
  16. syntax on
  17. set number
  18. set relativenumber
  19. set nowrap
  20. set autoindent
  21. set backspace=indent,eol,start
  22. set complete-=i
  23. set showmatch
  24. set smarttab
  25. set incsearch
  26. set ruler
  27. set showcmd
  28. set wildmenu
  29. set foldmethod=indent
  30. set foldcolumn=1
  31. if !&scrolloff
  32. set scrolloff=1
  33. endif
  34. if !&sidescrolloff
  35. set sidescrolloff=5
  36. endif
  37. set display+=lastline
  38. " spaces not tabs, etc
  39. set tabstop=4
  40. set softtabstop=4
  41. set shiftwidth=4
  42. set expandtab
  43. " show invisible characters
  44. nmap <leader>l :set list!<CR>
  45. set listchars=tab:▸\ ,eol:¬
  46. " multi-file
  47. set hidden
  48. " shortcut to silently run commands
  49. command -nargs=1 Run <bar>execute ':silent !'.<q-args> <bar>execute ':redraw!'
  50. map <up> <nop>
  51. map <down> <nop>
  52. map <left> <nop>
  53. map <right> <nop>
  54. imap <up> <nop>
  55. imap <down> <nop>
  56. imap <left> <nop>
  57. imap <right> <nop>
  58. " lets setup vundle
  59. set rtp+=~/.vim/bundle/Vundle.vim
  60. call vundle#begin()
  61. call vundle#rc()
  62. " vundle bundles
  63. Plugin 'gmarik/Vundle.vim'
  64. " bundles on github
  65. Plugin 'fholgado/minibufexpl.vim.git'
  66. Plugin 'Lokaltog/vim-powerline.git'
  67. Plugin 'Lokaltog/vim-distinguished.git'
  68. Plugin 'scrooloose/nerdtree.git'
  69. Plugin 'ervandew/supertab.git'
  70. Plugin 'myusuf3/numbers.vim.git'
  71. Plugin 'majutsushi/tagbar.git'
  72. Plugin 'nvie/vim-flake8.git'
  73. Plugin 'kien/rainbow_parentheses.vim.git'
  74. Plugin 'hynek/vim-python-pep8-indent'
  75. Plugin 'tmhedberg/SimpylFold'
  76. Plugin 'ejholmes/vim-forcedotcom'
  77. call vundle#end()
  78. filetype plugin indent on
  79. " toggle showing nerd-tree
  80. :nmap <leader>e :NERDTreeToggle<CR>
  81. " toggle showing tagbar
  82. nmap <leader>r :TagbarToggle<CR>
  83. " end tags with a key
  84. imap ,/ </<C-X><C-O>
  85. " xml validation
  86. :nmap <leader>; :%w !xmllint --valid --noout -
  87. " toggle line wrap
  88. :nmap <leader>w :setlocal wrap!<CR>:setlocal wrap?<CR>
  89. " dem fancy colors
  90. set t_Co=256
  91. "colorscheme ir_black " for macvim
  92. colorscheme distinguished
  93. " force django templates to use html syntax
  94. au BufNewFile,BufRead *.djhtml set filetype=html
  95. au BufNewFile,BufRead *.raml set filetype=yaml
  96. " sudo save
  97. cmap w!! w !sudo tee % >/dev/null
  98. " Let's try some mouse stuff
  99. set mouse=a
  100. " Mark the 80th column. PEP8 yo
  101. set colorcolumn=80
  102. " rainbow parens
  103. au VimEnter * RainbowParenthesesToggle
  104. au Syntax * RainbowParenthesesLoadRound
  105. au Syntax * RainbowParenthesesLoadSquare
  106. au Syntax * RainbowParenthesesLoadBraces