Skip to content

Instantly share code, notes, and snippets.

@AlexKaravaev
Created November 24, 2018 14:24
Show Gist options
  • Save AlexKaravaev/b2387dd602fd5ba0e2fb15a584568a46 to your computer and use it in GitHub Desktop.
Save AlexKaravaev/b2387dd602fd5ba0e2fb15a584568a46 to your computer and use it in GitHub Desktop.
My vimrc file
set nocompatible " be iMproved, required
filetype off " required
set exrc
set encoding=UTF-8
" See tabs"
set listchars=tab:▸\ ,eol:¬
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" ==== plugin manager
Plugin 'VundleVim/Vundle.vim'
" ==== helpers
Plugin 'vim-scripts/L9'
" ==== File tree
Plugin 'scrooloose/nerdtree'
" ==== Completion
Plugin 'Valloric/YouCompleteMe'
" ==== Git
Plugin 'airblade/vim-gitgutter'
Plugin 'tpope/vim-fugitive'
" ==== syntax helpers
Plugin 'scrooloose/syntastic'
Plugin 'tpope/vim-surround'
Plugin 'cakebaker/scss-syntax.vim'
Plugin 'othree/yajs.vim'
Plugin 'mitsuhiko/vim-jinja'
Plugin 'octol/vim-cpp-enhanced-highlight'
Plugin 'ap/vim-css-color'
Plugin 'Vimjas/vim-python-pep8-indent'
Plugin 'python-rope/rope'
Plugin 'python-rope/ropemode'
Plugin 'python-rope/ropevim'
Plugin 'klen/pylama'
Plugin 'Yggdroot/indentLine'
" ==== moving / searching
Plugin 'easymotion/vim-easymotion'
Plugin 'kien/ctrlp.vim'
Plugin 'ervandew/supertab'
Plugin 'terryma/vim-multiple-cursors'
" ==== snippets
Plugin 'SirVer/ultisnips'
" Status bar on bottom
Plugin 'bling/vim-airline'
" ==== PLUGIN THEMES
Plugin 'morhetz/gruvbox'
call vundle#end()
filetype plugin indent on
" ==== Colors and other basic settings
colo gruvbox
set guifont=Monospace\ 10
set fillchars+=vert:\$
syntax enable
set ruler
set background=dark
set number
set laststatus=2
set smartindent
set st=4 sw=4 et
set shiftwidth=4
set tabstop=4
"let &colorcolumn="80"
":set guioptions-=m "remove menu bar
":set guioptions-=T "remove toolbar
:set guioptions-=r "remove right-hand scroll bar
:set guioptions-=L "remove left-hand scroll bar
:set lines=999 columns=999
" ==== NERDTREE
let NERDTreeIgnore = ['__pycache__', '\.pyc$', '\.o$', '\.so$', '\.a$', '\.swp', '*\.swp', '\.swo', '\.swn', '\.swh', '\.swm', '\.swl', '\.swk', '\.sw*$', '[a-zA-Z]*egg[a-zA-Z]*', '.DS_Store']
let NERDTreeShowHidden=1
let g:NERDTreeWinPos="left"
let g:NERDTreeDirArrows=0
map <C-t> :NERDTreeToggle<CR>
" ==== Syntastic
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_javascript_checkers = ['eslint']
let g:syntastic_javascript_mri_args = "--config=$HOME/.jshintrc"
let g:syntastic_python_checkers = [ 'pylint', 'flake8', 'pep8', 'python']
let g:syntastic_yaml_checkers = ['jsyaml']
let g:syntastic_html_tidy_exec = 'tidy5'
" === flake8
let g:flake8_show_in_file=1
" ==== snippets
" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"
" make YCM compatible with UltiSnips (using supertab)
let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
let g:SuperTabDefaultCompletionType = '<C-n>'
" better key bindings for UltiSnipsExpandTrigger
let g:UltiSnipsExpandTrigger = "<tab>"
let g:UltiSnipsJumpForwardTrigger = "<tab>"
let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"
" ==== Easymotion
let g:EasyMotion_do_mapping = 0
let g:EasyMotion_smartcase = 1
nmap f <Plug>(easymotion-s)
" ==== IndentLine
let g:indentLine_char = '¦'
" ==== moving around
nmap <silent> <A-Up> :wincmd k<CR>
nmap <silent> <A-Down> :wincmd j<CR>
nmap <silent> <A-Left> :wincmd h<CR>
nmap <silent> <A-Right> :wincmd l<CR>
" ==== disable mouse
set mouse=c
" ==== disable swap file warning
set shortmess+=A
" ==== custom commands
command JsonPretty execute ":%!python -m json.tool"
set secure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment