Advertisement
RODJER

Vim Config

Sep 4th, 2022 (edited)
3,016
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 5.09 KB | Writing | 0 0
  1. set nocompatible              " be iMproved, required
  2. filetype off                  " required
  3.  
  4. " set the runtime path to include Vundle and initialize
  5. set rtp+=~/.vim/bundle/Vundle.vim
  6. call vundle#begin()
  7. " alternatively, pass a path where Vundle should install plugins
  8. "call vundle#begin('~/some/path/here')
  9.  
  10. " let Vundle manage Vundle, required
  11. Plugin 'VundleVim/Vundle.vim'
  12.  
  13. " The following are examples of different formats supported.
  14. " Keep Plugin commands between vundle#begin/end.
  15. " plugin on GitHub repo
  16. Plugin 'tpope/vim-fugitive'
  17. " plugin from http://vim-scripts.org/vim/scripts.html
  18. " Plugin 'L9'
  19. " Git plugin not hosted on GitHub
  20. Plugin 'git://git.wincent.com/command-t.git'
  21. " git repos on your local machine (i.e. when working on your own plugin)
  22. " Plugin 'file:///home/gmarik/path/to/plugin'
  23. " The sparkup vim script is in a subdirectory of this repo called vim.
  24. " Pass the path to set the runtimepath properly.
  25. Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
  26. " Install L9 and avoid a Naming conflict if you've already installed a
  27. " different version somewhere else.
  28. " Plugin 'ascenator/L9', {'name': 'newL9'}
  29. Plugin 'flazz/vim-colorschemes'
  30. Plugin 'tpope/vim-commentary'
  31. Plugin 'jeetsukumaran/vim-pythonsense'
  32. Plugin 'scrooloose/nerdtree'
  33. Plugin 'ryanoasis/vim-devicons'
  34. Plugin 'Vimjas/vim-python-pep8-indent'
  35. Plugin 'dense-analysis/ale'
  36. Plugin 'davidhalter/jedi-vim'
  37. Plugin 'klen/python-mode'
  38. Plugin 'majutsushi/tagbar'
  39. Plugin 'rosenfeld/conque-term'
  40. Plugin 'garbas/vim-snipmate'
  41. " All of your Plugins must be added before the following line
  42. call vundle#end()            " required
  43. filetype plugin indent on    " required
  44. " To ignore plugin indent changes, instead use:
  45. "filetype plugin on
  46. "
  47. " Brief help
  48. " :PluginList       - lists configured plugins
  49. " :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
  50. " :PluginSearch foo - searches for foo; append `!` to refresh local cache
  51. " :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
  52. "
  53. " see :h vundle for more details or wiki for FAQ
  54. " Put your non-Plugin stuff after this line
  55. syntax on
  56. filetype plugin indent on
  57. nnoremap <C-n> :NERDTree<CR>
  58.  
  59. autocmd VimEnter * NERDTree
  60. set tabstop=4
  61. set shiftwidth=4
  62. set smarttab
  63. set expandtab
  64. set softtabstop=4
  65. set autoindent
  66. let python_hightlight_all=1
  67. set t_Co=256
  68. syntax on
  69. set mousehide
  70. set mouse=a
  71. set termencoding=utf-8
  72. set showtabline=1
  73. set nobackup
  74. set noswapfile
  75. set encoding=utf-8
  76. set fileencodings=utf-8,cp125
  77. set guifont=Monaco:h21
  78. colorscheme OceanicNext
  79.  
  80. let g:ale_linters = {'python': 'all'}
  81. let g:ale_fixers = {'python': ['isort', 'yapf', 'remove_trailing_lines', 'trim_whitespace']}
  82.  
  83. let g:ale_lsp_suggestions = 1
  84. let g:ale_fix_on_save = 1
  85. let g:ale_go_gofmt_options = '-s'
  86. let g:ale_go_gometalinter_options = '— enable=gosimple — enable=staticcheck'
  87. let g:ale_completion_enabled = 1
  88. let g:ale_echo_msg_error_str = 'E'
  89. let g:ale_echo_msg_warning_str = 'W'
  90. let g:ale_echo_msg_format = '[%linter%] [%severity%] %code: %%s'
  91.  
  92. "=====================================================
  93. " Python-mode settings
  94. "=====================================================
  95. " отключаем автокомплит по коду (у нас вместо него используется jedi-vim)
  96. let g:pymode_rope = 0
  97. let g:pymode_rope_completion = 0
  98. let g:pymode_rope_complete_on_dot = 0
  99.  
  100. " документация
  101. let g:pymode_doc = 0
  102. let g:pymode_doc_key = 'K'
  103. " проверка кода
  104. let g:pymode_lint = 1
  105. let g:pymode_lint_checker = "pyflakes,pep8"
  106. let g:pymode_lint_ignore="E501,W601,C0110"
  107. " провека кода после сохранения
  108. let g:pymode_lint_write = 1
  109.  
  110. " поддержка virtualenv
  111. let g:pymode_virtualenv = 1
  112.  
  113. " установка breakpoints
  114. let g:pymode_breakpoint = 1
  115. let g:pymode_breakpoint_key = '<leader>b'
  116.  
  117. " подстветка синтаксиса
  118. let g:pymode_syntax = 1
  119. let g:pymode_syntax_all = 1
  120. let g:pymode_syntax_indent_errors = g:pymode_syntax_all
  121. let g:pymode_syntax_space_errors = g:pymode_syntax_all
  122.  
  123. " отключить autofold по коду
  124. let g:pymode_folding = 0
  125.  
  126. " возможность запускать код
  127. let g:pymode_run = 0
  128.  
  129. "=====================================================
  130. " User hotkeys
  131. "=====================================================
  132. " ConqueTerm
  133. " запуск интерпретатора на F5
  134. nnoremap <F5> :ConqueTermSplit python3<CR>
  135. " а debug-mode на <F6>
  136. nnoremap <F6> :exe "ConqueTermSplit python3 " . expand("%")<CR>
  137. let g:ConqueTerm_StartMessages = 0
  138. let g:ConqueTerm_CloseOnEnd = 0
  139. " проверка кода в соответствии с PEP8 через <leader>8
  140. autocmd FileType python map <buffer> <leader>8 :PymodeLint<CR>
  141.  
  142. " автокомплит через <Ctrl+Space>
  143. inoremap <C-space> <C-x><C-o>
  144.  
  145. " переключение между синтаксисами
  146. nnoremap <leader>Th :set ft=htmljinja<CR>
  147. nnoremap <leader>Tp :set ft=python<CR>
  148. nnoremap <leader>Tj :set ft=javascript<CR>
  149. nnoremap <leader>Tc :set ft=css<CR>
  150. nnoremap <leader>Td :set ft=django<CR>
  151.  
Tags: vim
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement