Share some of my dotfiles across configurations
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.

89 lines
1.8KB

  1. " Plugin management
  2. set nocompatible
  3. filetype off
  4. set rtp+=~/.vim/bundle/Vundle.vim
  5. call vundle#begin()
  6. Plugin 'VundleVim/Vundle.vim'
  7. " Explorer
  8. Plugin 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
  9. " File search
  10. Plugin 'ctrlpvim/ctrlp.vim'
  11. " Class explorer
  12. Plugin 'majutsushi/tagbar', { 'on': 'TagbarToggle' }
  13. " Status Line
  14. Plugin 'vim-airline/vim-airline'
  15. " Intelligent folding
  16. Plugin 'tmhedberg/SimpylFold'
  17. " Git management
  18. Plugin 'tpope/vim-fugitive'
  19. " Autocomplete for python
  20. Plugin 'davidhalter/jedi-vim', { 'for': 'python' }
  21. " Asynchronous syntax check
  22. Plugin 'dense-analysis/ale'
  23. " Color schemes
  24. Plugin 'jnurmine/Zenburn'
  25. Plugin 'altercation/vim-colors-solarized'
  26. " Code completion using <tab>
  27. " Plugin 'ervandew/supertab'
  28. call vundle#end()
  29. filetype plugin indent on
  30. " Syntax
  31. syntax enable
  32. let python_highlight_all = 1
  33. set number
  34. set cursorline
  35. set showmatch
  36. set laststatus=2 " Always display statusline
  37. if has('gui_running')
  38. set background=dark
  39. colorscheme solarized
  40. else
  41. colorscheme zenburn
  42. endif
  43. " Indentation
  44. set tabstop=4
  45. set softtabstop=4
  46. set shiftwidth=0
  47. set textwidth=79
  48. set autoindent
  49. set smarttab
  50. autocmd filetype python set expandtab
  51. au BufNewFile,BufRead *.js, *.html, *.css
  52. \ set tabstop=2
  53. \ set softtabstop=2
  54. \ set shiftwidth=2
  55. " Display
  56. set list
  57. set list listchars=tab:▷⋅,trail:⋅,nbsp:⋅
  58. set nowrap
  59. set hlsearch
  60. set incsearch
  61. set foldlevel=3
  62. " Behaviour
  63. set hidden " Keep previous buffer when opening a new file
  64. set wildmenu " Sexy autocomplete
  65. " Mappings
  66. let mapleader=","
  67. map <C-h> <C-w>h
  68. map <C-j> <C-w>j
  69. map <C-k> <C-w>k
  70. map <C-l> <C-w>l
  71. nnoremap <space> za
  72. nnoremap <F5> :!%:p<CR>
  73. nmap <F7> :NERDTreeToggle<CR>
  74. nmap <F8> :TagbarToggle<CR>
  75. " Plugin Ale
  76. packloadall
  77. silent! helptags ALL
  78. " Other Plugin
  79. let g:SimpylFold_docstring_preview=1
  80. let g:airline#extensions#tabline#enabled=1