Skip to content

Instantly share code, notes, and snippets.

@diegoquintanav
Created April 7, 2018 17:39
Show Gist options
  • Save diegoquintanav/4b91957a334a33321165de9fe155a76b to your computer and use it in GitHub Desktop.
Save diegoquintanav/4b91957a334a33321165de9fe155a76b to your computer and use it in GitHub Desktop.
miscellaneous configuration files
set nocompatible " required
filetype off " required
"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\+$/
" 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)
" python autoindentation
Plugin 'vim-scripts/indentpython.vim'
"autocompletion. Requires installation of YCM.
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/'}
" ...
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment