Created
August 4, 2017 12:51
-
-
Save antonstakhouski/015147c67dd3d2dc3da0731c7bf990ef to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" An example for a vimrc file. | |
" | |
" Maintainer: Bram Moolenaar <[email protected]> | |
" Last change: 2016 Jul 28 | |
" | |
" To use it, copy it to | |
" for Unix and OS/2: ~/.vimrc | |
" for Amiga: s:.vimrc | |
" for MS-DOS and Win32: $VIM\_vimrc | |
" for OpenVMS: sys$login:.vimrc | |
" When started as "evim", evim.vim will already have done these settings. | |
" plugin manager | |
execute pathogen#infect() | |
syntax on | |
filetype plugin indent on | |
set nu | |
set incsearch " инкреминтируемый поиск | |
set hlsearch " подсветка результатов поиска | |
set t_Co=256 | |
colorscheme molokai | |
"НАСТРОЙКИ ОТСТУПА | |
set shiftwidth=4 " размер отступов (нажатие на << или >>) | |
set tabstop=4 " ширина табуляции | |
set softtabstop=4 " ширина 'мягкого' таба | |
set autoindent " ai - включить автоотступы (копируется отступ предыдущей строки) | |
set cindent " ci - отступы в стиле С | |
set expandtab " преобразовать табуляцию в пробелы | |
set smartindent " Умные отступы (например, автоотступ после {) | |
" Для указанных типов файлов отключает замену табов пробелами и меняет ширину отступа | |
au FileType crontab,fstab,make set noexpandtab tabstop=8 shiftwidth=8 | |
nnoremap <F6> :make!<cr> | |
let g:flake8_show_in_file=1 " show | |
" to use colors defined in the colorscheme | |
highlight link Flake8_Error Error | |
highlight link Flake8_Warning WarningMsg | |
highlight link Flake8_Complexity WarningMsg | |
highlight link Flake8_Naming WarningMsg | |
highlight link Flake8_PyFlake WarningMsg | |
nnoremap th :tabfirst<CR> | |
nnoremap tj :tabnext<CR> | |
nnoremap tk :tabprev<CR> | |
nnoremap tl :tablast<CR> | |
nnoremap tt :tabedit<Space> | |
nnoremap tn :tabnext<Space> | |
nnoremap tm :tabm<Space> | |
nnoremap td :tabclose<CR> | |
augroup vimrc_autocmd | |
augroup END | |
" run python shell on F5 | |
nnoremap <silent> <F5> :!clear;python %<CR> | |
" YCM defaults | |
let g:ycm_global_ycm_extra_conf = '/usr/share/vim/vimfiles/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py' | |
let g:ycm_path_to_python_interpreter = '/usr/bin/python2' | |
let g:ycm_confirm_extra_conf = 0 | |
set laststatus=2 | |
let g:airline_theme='badwolf' | |
let g:airline_powerline_fonts = 1 | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline#extensions#tabline#formatter = 'unique_tail' | |
set laststatus=2 | |
" TagBar настройки | |
map <F4> :TagbarToggle<CR> | |
let g:tagbar_autofocus = 0 " автофокус на Tagbar при открытии | |
" NerdTree настройки | |
" показать NERDTree на F3 | |
map <F3> :NERDTreeToggle<CR> | |
"игноррируемые файлы с расширениями | |
let NERDTreeIgnore=['\~$', '\.pyc$', '\.pyo$', '\.class$', 'pip-log\.txt$', '\.o$'] | |
" Add spaces after comment delimiters by default | |
let g:NERDSpaceDelims = 1 | |
" Use compact syntax for prettified multi-line comments | |
let g:NERDCompactSexyComs = 1 | |
" Align line-wise comment delimiters flush left instead of following code indentation | |
let g:NERDDefaultAlign = 'left' | |
" Set a language to use its alternate delimiters by default | |
let g:NERDAltDelims_java = 1 | |
" Add your own custom formats or override the defaults | |
let g:NERDCustomDelimiters = { 'c': { 'left': '/**','right': '*/' } } | |
" Allow commenting and inverting empty lines (useful when commenting a region) | |
let g:NERDCommentEmptyLines = 1 | |
" Enable trimming of trailing whitespace when uncommenting | |
let g:NERDTrimTrailingWhitespace = 1 | |
if v:progname =~? "evim" | |
finish | |
endif | |
" Get the defaults that most users want. | |
source $VIMRUNTIME/defaults.vim | |
if has("vms") | |
set nobackup " do not keep a backup file, use versions instead | |
else | |
set backup " keep a backup file (restore to previous version) | |
if has('persistent_undo') | |
set undofile " keep an undo file (undo changes after closing) | |
endif | |
endif | |
if &t_Co > 2 || has("gui_running") | |
" Switch on highlighting the last used search pattern. | |
set hlsearch | |
endif | |
" Only do this part when compiled with support for autocommands. | |
if has("autocmd") | |
" Put these in an autocmd group, so that we can delete them easily. | |
augroup vimrcEx | |
au! | |
" For all text files set 'textwidth' to 78 characters. | |
autocmd FileType text setlocal textwidth=78 | |
autocmd BufWritePost *.py call Flake8() | |
autocmd BufWritePre * %s/\s\+$//e | |
augroup END | |
else | |
set autoindent " always set autoindenting on | |
endif " has("autocmd") | |
" Add optional packages. | |
" | |
" The matchit plugin makes the % command work better, but it is not backwards | |
" compatible. | |
if has('syntax') && has('eval') | |
packadd matchit | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment