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.

117 lines
2.1 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
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=8
  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. call vundle#end()
  74. filetype plugin indent on
  75. " toggle showing nerd-tree
  76. :nmap <leader>e :NERDTreeToggle<CR>
  77. " toggle showing tagbar
  78. nmap <leader>r :TagbarToggle<CR>
  79. " end tags with a key
  80. imap ,/ </<C-X><C-O>
  81. " xml validation
  82. :nmap <leader>; :%w !xmllint --valid --noout -
  83. " toggle line wrap
  84. :nmap <leader>w :setlocal wrap!<CR>:setlocal wrap?<CR>
  85. " dem fancy colors
  86. set t_Co=256
  87. "colorscheme ir_black " for macvim
  88. colorscheme distinguished
  89. " force django templates to use html syntax
  90. au BufNewFile,BufRead *.djhtml set filetype=html
  91. " sudo save
  92. cmap w!! w !sudo tee % >/dev/null
  93. " Let's try some mouse stuff
  94. set mouse=a