Skip to content

Instantly share code, notes, and snippets.

Created November 11, 2011 09:27
Show Gist options
  • Save yieldthought/1357590 to your computer and use it in GitHub Desktop.
Save yieldthought/1357590 to your computer and use it in GitHub Desktop.
YieldThought's .vimrc
"Set Mapleader
let mapleader = ","
let g:mapleader = ","
colo zenburn
map <Leader>, :NERDTreeToggle<cr>
let Tlist_Ctags_Cmd = '/usr/local/bin/ctags'
let Tlist_WinWidth = 50
map <Leader>. :TlistToggle<cr>
"Check python syntax
let g:pcs_hotkey = '<LocalLeader>x'
"Quick Open
let g:CommandTMaxFiles=30000
set wildignore+=*.o,.ddt-*,.treeserver-*
let g:CommandTMatchWindowAtTop = 1
"Scratch buffer
map <Leader>k :ScratchOpen<cr>
map <Leader>rt "zyiw:ScratchOpen<cr>:0r!~/Work/code/util/rt show -f id,Subject,Queue,Status,Creator,Owner,LastUpdated,Priority ticket/<C-R>z<cr>o<Esc>
map <Leader>tt "zyiw:r!~/Work/code/util/rt show -f Subject ticket/<C-R>z \| grep Subject \| cut -d' ' -f2-<cr>kA:<Esc>Jj
set tags=tags;$HOME
"Rebuild cscope
map <Leader>cs !cscope -bqk<cr>:cs add cscope.out<cr>
"Buffer shortcuts
map <Leader>f :b#<cr>
"ddt log files
map <Leader>gdb :!cdata-from-log % >/tmp/cdata.log<cr>:e /tmp/cdata.log<cr>
"Disable virtual bell
set vb t_vb="
"Make backspace work
set backspace=2
"Code navigation
map <Leader>gd ?^{<cr>kf:ll
"Misc stuff
set autoread
set hidden
set hlsearch
set incsearch
set ignorecase
set smartcase
set smartindent
map <Leader>c :let @/ = ""<cr>
syntax enable
set nu
set textwidth=0 " No annoying word wrapping
set tabstop=4
set shiftwidth=4
set expandtab
set guifont=Menlo:h14
filetype on
filetype plugin on
set nocp
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
" Replaced by clang_complete for now
" autocmd FileType c set omnifunc=ccomplete#CompleteCpp
autocmd FileType ChangeLog set tw=80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment