|
@@ -1,18 +1,19 @@
|
|
|
set nocompatible " be iMproved, required
|
|
|
filetype off " required
|
|
|
syntax on
|
|
|
+set encoding=utf-8
|
|
|
|
|
|
" Accomodate a dark background
|
|
|
set background=dark
|
|
|
|
|
|
" set the runtime path to include Vundle and initialize
|
|
|
-"set rtp+=~/.vim/bundle/Vundle.vim
|
|
|
-"call vundle#begin()
|
|
|
+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'
|
|
|
+Plugin 'gmarik/Vundle.vim'
|
|
|
|
|
|
" The following are examples of different formats supported.
|
|
|
" Keep Plugin commands between vundle#begin/end.
|
|
@@ -31,10 +32,10 @@ set background=dark
|
|
|
"n 'fatih/vim-go'Plugin 'user/L9', {'name': 'newL9'}
|
|
|
" Go Plugin:
|
|
|
"Plugin 'fatih/vim-go'
|
|
|
-
|
|
|
+Plugin 'vim-scripts/indentpython.vim'
|
|
|
|
|
|
" All of your Plugins must be added before the following line
|
|
|
-"call vundle#end() " required
|
|
|
+call vundle#end() " required
|
|
|
filetype plugin indent on " required
|
|
|
" To ignore plugin indent changes, instead use:
|
|
|
"filetype plugin on
|
|
@@ -51,3 +52,25 @@ filetype plugin indent on " required
|
|
|
set tabstop=2
|
|
|
set shiftwidth=2
|
|
|
set expandtab
|
|
|
+
|
|
|
+" Python PEP-8
|
|
|
+au BufNewFile,BufRead *.py
|
|
|
+ \ set tabstop=4 |
|
|
|
+ \ set softtabstop=4 |
|
|
|
+ \ set shiftwidth=4 |
|
|
|
+ \ set textwidth=79 |
|
|
|
+ \ set expandtab |
|
|
|
+ \ set autoindent |
|
|
|
+ \ set fileformat=unix
|
|
|
+
|
|
|
+" But not for most files
|
|
|
+au BufNewFile,BufRead *.js, *.html, *.css
|
|
|
+ \ set tabstop=2 |
|
|
|
+ \ set softtabstop=2 |
|
|
|
+ \ set shiftwidth=2
|
|
|
+
|
|
|
+" Flag bad whitespace
|
|
|
+" I hate this because it highlights while i'm writing
|
|
|
+"highlight BadWhitespace ctermfg=16 ctermbg=253 guifg=#000000 guibg=#F8F8F0
|
|
|
+"au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /[^\s]\s\+$/
|
|
|
+
|