Vim with Vundle

Full credit to this amazing post: it made my .vimrc so much neater and understandable. Until now I had a mess of plugins pulled from different sources, and I didn’t know which extension was enabling which feature.

Below is my full .vimrc, mostly identical to the one in the post, with a few minor tweaks that I’m used to. I copied this to a couple of VMs I use, and it is ridiculously simple to clone the Vundle repo and hit :PluginInstall to get everything set up nicely.

" Get vundle from here:
" git clone ~/.vim/bundle/Vundle.vim
set nocompatible              " required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" 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 'vim-scripts/indentpython.vim'
Plugin 'scrooloose/syntastic'
Plugin 'nvie/vim-flake8'
Plugin 'jnurmine/Zenburn'
Plugin 'altercation/vim-colors-solarized'
Plugin 'sjl/badwolf'
Plugin 'tpope/vim-markdown'
Plugin 'klen/python-mode'
Plugin 'kien/ctrlp.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'mhinz/vim-startify'
Plugin 'bling/vim-airline'
Plugin 'scrooloose/nerdtree'
Plugin 'majutsushi/tagbar'
Plugin 'airblade/vim-gitgutter'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required

"split navigations

" tagbar at F8
nmap  :TagbarToggle

" my favourite font
set guifont=Hack:h11:cANSI

" markdown mode for .page files
autocmd BufNewFile,BufReadPost *.md set filetype=markdown
autocmd BufNewFile,BufReadPost *.page set filetype=markdown

set nofoldenable    " disable folding

" python settings
au BufRead,BufNewFile *.py,*.pyw set tabstop=4
au BufRead,BufNewFile *.py,*.pyw set softtabstop=4
au BufRead,BufNewFile *.py,*.pyw set shiftwidth=4
au BufRead,BufNewFile *.py,*.pyw set textwidth=79
au BufRead,BufNewFile *.py,*.pyw set expandtab
au BufRead,BufNewFile *.py,*.pyw set autoindent
" au BufRead,BufNewFile *.py,*.pyw match BadWhitespace /^\t\+/
" au BufRead,BufNewFile *.py,*.pyw match BadWhitespace /\s\+$/
au         BufNewFile *.py,*.pyw set fileformat=unix
au BufRead,BufNewFile *.py,*.pyw let b:comment_leader = '#'

" General settings
set tabstop=4        " number of visual spaces per TAB
set softtabstop=4 " number of spaces in tab when editing
set expandtab        " tabs are spaces
set wildignore=*.o,*~,*.pyc
set encoding=utf-8

let python_highlight_all=1
syntax on
colorscheme badwolf
let NERDTreeIgnore=['\.pyc
, '\~
] "ignore files in NERDTree
set ignorecase
set paste
set nohlsearch
set incsearch
nmap  a=strftime("%A %Y%m%d")
imap  =strftime("%A %Y%m%d")
:set pastetoggle=
set laststatus=2 "airline needs this
let g:airline#extensions#tabline#enabled = 1
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn|pyc)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s