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.

129 lines
2.5 KiB

11 years ago
12 years ago
12 years ago
12 years ago
11 years ago
11 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
11 years ago
12 years ago
11 years ago
11 years ago
11 years ago
10 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. call vundle#end()
  76. filetype plugin indent on
  77. " toggle showing nerd-tree
  78. :nmap <leader>e :NERDTreeToggle<CR>
  79. " toggle showing tagbar
  80. nmap <leader>r :TagbarToggle<CR>
  81. " end tags with a key
  82. imap ,/ </<C-X><C-O>
  83. " xml validation
  84. :nmap <leader>; :%w !xmllint --valid --noout -
  85. " toggle line wrap
  86. :nmap <leader>w :setlocal wrap!<CR>:setlocal wrap?<CR>
  87. " dem fancy colors
  88. set t_Co=256
  89. "colorscheme ir_black " for macvim
  90. colorscheme distinguished
  91. " force django templates to use html syntax
  92. au BufNewFile,BufRead *.djhtml set filetype=html
  93. au BufNewFile,BufRead *.raml set filetype=yaml
  94. " sudo save
  95. cmap w!! w !sudo tee % >/dev/null
  96. " Let's try some mouse stuff
  97. set mouse=a
  98. " Mark the 80th column. PEP8 yo
  99. set colorcolumn=80
  100. " rainbow parens
  101. au VimEnter * RainbowParenthesesToggle
  102. au Syntax * RainbowParenthesesLoadRound
  103. au Syntax * RainbowParenthesesLoadSquare
  104. au Syntax * RainbowParenthesesLoadBraces