Share some of my dotfiles across configurations
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

93 lines
2.1KB

  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. " Status Line
  8. Plugin 'vim-airline/vim-airline'
  9. " Explorer
  10. Plugin 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
  11. " File search
  12. Plugin 'ctrlpvim/ctrlp.vim'
  13. " Class explorer
  14. Plugin 'majutsushi/tagbar', { 'on': 'TagbarToggle' }
  15. " Auto completion using <Tab>
  16. Plugin 'ervandew/supertab'
  17. " Syntax check
  18. Plugin 'dense-analysis/ale'
  19. " Code completion and refactoring (Python)
  20. Plugin 'davidhalter/jedi-vim'
  21. " Intelligent folding
  22. Plugin 'tmhedberg/SimpylFold'
  23. " Git management
  24. Plugin 'tpope/vim-fugitive'
  25. " Markdown
  26. Plugin 'godlygeek/tabular'
  27. Plugin 'plasticboy/vim-markdown'
  28. " Color schemes
  29. Plugin 'morhetz/gruvbox'
  30. call vundle#end()
  31. filetype plugin indent on
  32. " Syntax
  33. syntax enable
  34. let python_highlight_all=1
  35. set number
  36. set cursorline
  37. set showmatch
  38. set laststatus=2 " Always display statusline
  39. set background=dark
  40. let g:gruvbox_contrast_dark='hard'
  41. if filereadable( expand("$HOME/.vim/bundle/gruvbox/colors/gruvbox.vim") )
  42. colorscheme gruvbox
  43. endif
  44. " Indentation
  45. set tabstop=4
  46. set softtabstop=4
  47. set shiftwidth=0
  48. " set textwidth=79
  49. set autoindent
  50. set smarttab
  51. autocmd filetype python set expandtab
  52. " Display
  53. set list
  54. set list listchars=tab:\|·,trail:⋅,nbsp:⋅
  55. " set nowrap
  56. set hlsearch
  57. set incsearch
  58. set foldlevel=2
  59. set colorcolumn=80
  60. " Behaviour
  61. set hidden " Keep previous buffer when opening a new file
  62. set wildmenu " Sexy autocomplete
  63. set wildmode=longest:full,full
  64. set wildignorecase
  65. " Uncomment the following to have Vim jump to the last position when
  66. " reopening a file
  67. au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
  68. " Mappings
  69. let mapleader=","
  70. map <C-h> <C-w>h
  71. map <C-j> <C-w>j
  72. map <C-k> <C-w>k
  73. map <C-l> <C-w>l
  74. nnoremap <space> za
  75. nmap <F5> :w<CR>:!clear;python3 %<CR>
  76. nmap <F6> :!%:p<CR>
  77. nmap <F7> :NERDTreeToggle<CR>
  78. nmap <F8> :TagbarToggle<CR>
  79. nmap <C-Up> :lprevious<CR>
  80. nmap <C-Down> :lnext<CR>
  81. " Plugin config
  82. let g:SimpylFold_docstring_preview=1
  83. let g:airline#extensions#tabline#enabled=1
  84. let g:jedi#completions_enabled = 1
  85. let g:jedi#smart_auto_mappings = 1