Advertisement
dibusure

vimrc

Jul 24th, 2021
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.81 KB | None | 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. Plugin 'mattn/emmet-vim'
  13.  
  14. " The following are examples of different formats supported.
  15. " Keep Plugin commands between vundle#begin/end.
  16. " plugin on GitHub repo
  17. Plugin 'tpope/vim-fugitive'
  18. " plugin from http://vim-scripts.org/vim/scripts.html
  19. " Plugin 'L9'
  20. " Git plugin not hosted on GitHub
  21. Plugin 'git://git.wincent.com/command-t.git'
  22. " git repos on your local machine (i.e. when working on your own plugin)
  23. " Plugin 'file:///home/gmarik/path/to/plugin'
  24. " The sparkup vim script is in a subdirectory of this repo called vim.
  25. " Pass the path to set the runtimepath properly.
  26. Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
  27. " Install L9 and avoid a Naming conflict if you've already installed a
  28. " different version somewhere else.
  29. " Plugin 'ascenator/L9', {'name': 'newL9'}
  30.  
  31. Plugin 'flazz/vim-colorschemes'
  32. Plugin 'tpope/vim-surround'
  33. Plugin 'xolox/vim-colorscheme-switcher'
  34. Plugin 'xolox/vim-misc'
  35.  
  36. " All of your Plugins must be added before the following line
  37. call vundle#end() " required
  38. filetype plugin indent on " required
  39. " To ignore plugin indent changes, instead use:
  40. "filetype plugin on
  41. "
  42. " Brief help
  43. " :PluginList - lists configured plugins
  44. " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
  45. " :PluginSearch foo - searches for foo; append `!` to refresh local cache
  46. " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
  47. "
  48. " see :h vundle for more details or wiki for FAQ
  49. " Put your non-Plugin stuff after this line
  50.  
  51.  
  52.  
  53.  
  54. " Настройки табов для Python, согласно рекоммендациям
  55. set tabstop=4
  56. set shiftwidth=4
  57. set smarttab
  58. set expandtab "Ставим табы пробелами
  59. set softtabstop=4 "4 пробела в табе
  60. " Автоотступ
  61. set autoindent
  62. " Подсвечиваем все что можно подсвечивать
  63. let python_highlight_all = 1
  64. " Включаем 256 цветов в терминале, мы ведь работаем из иксов?
  65. " Нужно во многих терминалах, например в gnome-terminal
  66. set t_Co=256
  67.  
  68. " Перед сохранением вырезаем пробелы на концах (только в .py файлах)
  69. autocmd BufWritePre *.py normal m`:%s/\s\+$//e ``
  70. " В .py файлах включаем умные отступы после ключевых слов
  71. autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
  72.  
  73. syntax on "Включить подсветку синтаксиса
  74.  
  75. " set nu "Включаем нумерацию строк
  76. set mousehide "Спрятать курсор мыши когда набираем текст
  77. set mouse=a "Включить поддержку мыши
  78. set termencoding=utf-8 "Кодировка терминала
  79. set novisualbell "Не мигать
  80. set t_vb= "Не пищать! (Опции 'не портить текст', к сожалению, нету)
  81. " Удобное поведение backspace
  82. set backspace=indent,eol,start whichwrap+=<,>,[,]
  83. " Вырубаем черточки на табах
  84. set showtabline=1
  85.  
  86. " Переносим на другую строчку, разрываем строки
  87. set wrap
  88. set linebreak
  89.  
  90. " Вырубаем .swp и ~ (резервные) файлы
  91. set nobackup
  92. set noswapfile
  93. set encoding=utf-8 " Кодировка файлов по умолчанию
  94. set fileencodings=utf8,cp1251
  95.  
  96. set clipboard=unnamed
  97. set ruler
  98.  
  99. set hidden
  100. nnoremap <C-N> :bnext<CR>
  101. nnoremap <C-P> :bprev<CR>
  102.  
  103. " Выключаем звук в Vim
  104. set visualbell t_vb=
  105.  
  106. "Переключение табов по CMD+number для MacVim
  107. if has("gui_macvim")
  108. " Press Ctrl-Tab to switch between open tabs (like browser tabs) to
  109. " the right side. Ctrl-Shift-Tab goes the other way.
  110. noremap <C-Tab> :tabnext<CR>
  111. noremap <C-S-Tab> :tabprev<CR>
  112.  
  113. " Switch to specific tab numbers with Command-number
  114. noremap <D-1> :tabn 1<CR>
  115. noremap <D-2> :tabn 2<CR>
  116. noremap <D-3> :tabn 3<CR>
  117. noremap <D-4> :tabn 4<CR>
  118. noremap <D-5> :tabn 5<CR>
  119. noremap <D-6> :tabn 6<CR>
  120. noremap <D-7> :tabn 7<CR>
  121. noremap <D-8> :tabn 8<CR>
  122. noremap <D-9> :tabn 9<CR>
  123. " Command-0 goes to the last tab
  124. noremap <D-0> :tablast<CR>
  125. endif
  126.  
  127. set guifont=Monaco:h18
  128. "colorscheme xcode
  129. "colorscheme wwdc16
  130. "colorscheme understated
  131. colorscheme twitchy
  132.  
  133. set showtabline=2
  134. let g:user_emmet_leader_key=','
  135.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement