Created
September 24, 2018 20:59
-
-
Save ZenToad/08af3307cfad5e527e2b136948d83a69 to your computer and use it in GitHub Desktop.
My `.vimrc` file
This file contains 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
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 'gmarik/Vundle.vim' | |
" Add all your plugins here (note older versions of Vundle used Bundle instead of Plugin) | |
Plugin 'altercation/vim-colors-solarized' " solarized colorscheme | |
Plugin 'tmhedberg/SimpylFold' " code folding | |
Plugin 'vim-scripts/indentpython.vim' " TAB = 4 whitespaces | |
Plugin 'Valloric/YouCompleteMe' " auto-completion | |
Plugin 'scrooloose/syntastic' " syntax check | |
Plugin 'nvie/vim-flake8' " PEP8 check | |
Plugin 'vim-airline/vim-airline' " airline | |
Plugin 'vim-airline/vim-airline-themes' " airline themes | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" Load Solarized colorscheme | |
let python_highlight_all=1 | |
syntax enable | |
set background=dark | |
let g:solarized_termcolors=256 | |
colorscheme solarized | |
" Manage split | |
set splitbelow | |
set splitright | |
" Split navigations | |
nnoremap <C-J> <C-W><C-J> " Ctrl-j move to the split below | |
nnoremap <C-K> <C-W><C-K> " Ctrl-k move to the split above | |
nnoremap <C-L> <C-W><C-L> " Ctrl-l move to the split to the right | |
nnoremap <C-H> <C-W><C-H> " Ctrl-h move to the split to the left | |
" Enable folding | |
set foldmethod=indent | |
set foldlevel=99 | |
" Enable folding with the spacebar | |
nnoremap <space> za | |
" Show docstrings for folded code | |
let g:SimpylFold_docstring_preview=1 | |
" Comply to PEP8 indentation | |
au BufNewFile,BufRead *.py | |
\ set tabstop=4 | | |
\ set softtabstop=4 | | |
\ set shiftwidth=4 | | |
\ set textwidth=79 | | |
\ set expandtab | | |
\ set autoindent | | |
\ set fileformat=unix | | |
" Define BadWhitespace before using in a match | |
highlight BadWhitespace ctermbg=red guibg=darkred | |
" Flag extraneous whitespaces | |
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/ | |
" UTF8 support | |
set encoding=utf-8 | |
" Ensure autocomplete window goes away when we are done with it | |
let g:ycm_autoclose_preview_window_after_completion=1 | |
" Shortcut for go-to-definition | |
map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR> | |
" Line numbering | |
set nu | |
" Let airline use powerline fonts | |
let g:airline_powerline_fonts = 1 | |
" Copy to system clipboard | |
set clipboard=unnamedplus " on Linux | |
" set clipboard=unnamed " on Windows |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment