Skip to content

Instantly share code, notes, and snippets.

@nwjsmith
Created July 9, 2010 00:34
Embed
What would you like to do?
" Use Vim settings, rather than Vi settings
set nocompatible
" Use The Pope's awesome pathogen.vim to load plugins
call pathogen#runtime_append_all_bundles()
" Automatically detect filetypes
filetype on
" Use syntax highlighting
syntax on
" Show line numbers
set number
set numberwidth=5
" No backup
set nobackup
set nowritebackup
" Autoindent and use 2-space tabs
set tabstop=2
set smarttab
set shiftwidth=2
set autoindent
set expandtab
" Allow backspacing over everything
set backspace=start,indent,eol
" Highlight searches
set hlsearch
" No backups
set nobackup
set nowritebackup
" Always display the status line
set laststatus=2
" Use , as the leader
let mapleader = ","
" Get quick blame for any highlighted lines (,b for svn, ,g for git, ,h for hg)
vmap <Leader>b :<C-U>!svn blame <C-R>=expand("%:p") <CR> \| sed -n <C-R>=line("'<") <CR>,<C-R>=line("'>") <CR>p <CR>
vmap <Leader>g :<C-U>!git blame <C-R>=expand("%:p") <CR> \| sed -n <C-R>=line("'<") <CR>,<C-R>=line("'>") <CR>p <CR>
vmap <Leader>h :<C-U>!hg blame -fu <C-R>=expand("%:p") <CR> \| sed -n <C-R>=line("'<") <CR>,<C-R>=line("'>") <CR>p <CR>
" Open NERDTree
map <Leader>n :NERDTree <CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment