Last active
June 29, 2018 20:04
-
-
Save diegoquintanav/f15414bfad3b86c91298a29971e09172 to your computer and use it in GitHub Desktop.
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 " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
" check https://github.com/VundleVim/Vundle.vim for details | |
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' | |
" python autoindentation | |
Plugin 'vim-scripts/indentpython.vim' | |
"autocompletion | |
Bundle 'Valloric/YouCompleteMe' | |
" syntax highlighting for python | |
Plugin 'vim-syntastic/syntastic' | |
" flake8 linter | |
Plugin 'nvie/vim-flake8' | |
" git support | |
Plugin 'tpope/vim-fugitive' | |
" powerline | |
Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'} | |
" end of plugin list | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" To ignore plugin indent changes, instead use: | |
"filetype plugin on | |
" | |
" Brief help | |
" :PluginList - lists configured plugins | |
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate | |
" :PluginSearch foo - searches for foo; append `!` to refresh local cache | |
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal | |
" | |
" see :h vundle for more details or wiki for FAQ | |
" Put your non-Plugin stuff after this line | |
" allow for external clipboard buffers | |
set clipboard=unnamed | |
" set numbers on | |
set nu | |
" pep 8 formatting | |
au BufNewFile,BufRead *.py | |
\ set tabstop=4 | |
\ set softtabstop=4 | |
\ set shiftwidth=4 | |
\ set textwidth=79 | |
\ set expandtab | |
\ set autoindent | |
\ set fileformat=unix | |
" formatting for other files | |
au BufNewFile,BufRead *.js, *.html, *.css | |
\ set tabstop=2 | |
\ set softtabstop=2 | |
\ set shiftwidth=2 | |
" highlight all in python | |
let python_highlight_all=1 | |
syntax on | |
" support for virualenvironment | |
" Virtualenv support | |
py3 << EOF | |
import os | |
import sys | |
if 'VIRTUAL_ENV' in os.environ: | |
project_base_dir = os.environ['VIRTUAL_ENV'] | |
activate_this = os.path.join(project_base_dir, 'bin/activate_this.py') | |
exec(compile(open(activate_this, "rb").read(), activate_this, 'exec'), | |
dict(__file__=activate_this)) | |
EOF | |
" flagging whitespace | |
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/ | |
" append fixed text from https://github.com/VundleVim/Vundle.vim before and after plugins |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment