Skip to content

Instantly share code, notes, and snippets.

@viacoban
Created May 16, 2016 16:45
Show Gist options
  • Save viacoban/121cee92eb2bee2ff1a13084b7a4fc68 to your computer and use it in GitHub Desktop.
Save viacoban/121cee92eb2bee2ff1a13084b7a4fc68 to your computer and use it in GitHub Desktop.
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
" Plugin 'tmhedberg/SimplyFold'
Plugin 'vim-scripts/indentpython.vim'
" Bundle 'Valloric/YouCompleteMe'
Plugin 'scrooloose/syntastic'
Plugin 'nvie/vim-flake8'
Plugin 'jnurmine/Zenburn'
Plugin 'altercation/vim-colors-solarized'
Plugin 'scrooloose/nerdtree'
Plugin 'kien/ctrlp.vim'
Plugin 'tpope/vim-fugitive'
call vundle#end()
filetype plugin indent on
colorscheme desert
let python_highlight_all=1
syntax on
" Enable folding
set foldmethod=indent
set foldlevel=99
set nu
set clipboard=unnamed
" autocmd vimenter * NERDTree
" Enable folding with the spacebar
nnoremap <space> za
" Python 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
au BufNewFile,BufRead *.js, *.html, *.css
\ set tabstop=2
\ set softtabstop=2
\ set shiftwidth=2
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
set encoding=utf-8
"python with virtualenv support
py << 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')
execfile(activate_this, dict(__file__=activate_this))
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment