Skip to content

Instantly share code, notes, and snippets.

@miron0xff
Last active December 1, 2017 11:38
Show Gist options
  • Save miron0xff/d5c7697c4b9b153c95c017d722aa9452 to your computer and use it in GitHub Desktop.
Save miron0xff/d5c7697c4b9b153c95c017d722aa9452 to your computer and use it in GitHub Desktop.
set nocompatible " required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" Add all your plugins here (note older versions of Vundle used Bundle instead of Plugin)
Plugin 'tmhedberg/SimpylFold'
Plugin 'vim-scripts/indentpython.vim'
Bundle 'Valloric/YouCompleteMe'
Plugin 'scrooloose/syntastic'
Plugin 'nvie/vim-flake8'
Plugin 'jnurmine/Zenburn'
Plugin 'scrooloose/nerdtree'
Plugin 'Xuyuanp/nerdtree-git-plugin'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'vim-airline/vim-airline'
Plugin 'airblade/vim-gitgutter'
Plugin 'jiangmiao/auto-pairs'
Plugin 'ryanoasis/vim-devicons'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
colorscheme zenburn
set nu
set splitbelow
set splitright
set foldmethod=indent
set foldlevel=99
set encoding=utf-8
set go-=m " Remove menubar in GUI
set go-=T " Remove toolbar in GUI
" Enable folding with the spacebar
nnoremap <space> za
" split navigations
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" Cycle through buffers
nnoremap <Tab> :bnext<CR>
nnoremap <S-tab> :bprevious<CR>
" SimplyFold
let g:SimpylFold_docstring_preview=1
" Filetypes
au BufNewFile,BufRead *.py;
\ set tabstop=4
\ set softtabstop=4
\ set shiftwidth=4
\ set textwidth=79
\ set expandtab
\ set autoindent
\ set fileformat=unix
au BufNewFile,BufRead *.js, *.html, *.css ;
\ set tabstop=2
\ set softtabstop=2
\ set shiftwidth=2
let python_highlight_all=1
syntax on
" Unnecessary Whitespace
highlight BadWhitespace ctermbg=darkred guibg=darkred
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
" YCM goto
let g:ycm_autoclose_preview_window_after_completion=1
let g:ycm_python_binary_path = '/home/alex/.pyenv/shims/python'
map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
" Syntastic
let g:syntastic_always_populate_loc_list = 0
let g:syntastic_auto_loc_list = 0
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_error_symbol = '☓➝'
let g:syntastic_style_error_symbol = '!➝'
let g:syntastic_warning_symbol = '☓➝'
let g:syntastic_style_warning_symbol = '!➝'
" NERDTree
let NERDTreeIgnore=['\.pyc$', '\~$', '__pycache__'] "ignore files in NERDTree
map <C-n> :NERDTreeToggle<CR>
" CtrlP
let g:ctrlp_custom_ignore = '\v__pycache__$'
" Airline
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
" Show vertical line on 81th character
let &colorcolumn=join(range(81,999),",")
let &colorcolumn="80,".join(range(400,999),",")
" Gitgutter
set updatetime=250
let g:gitgutter_realtime = 1
let g:gitgutter_eager = 1
let g:gitgutter_sign_added = '•'
let g:gitgutter_sign_modified = '•'
let g:gitgutter_sign_removed = '•'
let g:gitgutter_sign_removed_first_line = '•'
let g:gitgutter_sign_modified_removed = '•'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment