Skip to content

Instantly share code, notes, and snippets.

@tisseurdetoile
Forked from yieldthought/.vimrc
Created March 8, 2013 13:21
Show Gist options
  • Save tisseurdetoile/5116417 to your computer and use it in GitHub Desktop.
Save tisseurdetoile/5116417 to your computer and use it in GitHub Desktop.
"Set Mapleader
let mapleader = ","
let g:mapleader = ","
"Theme
colo zenburn
"NERDTree
map <Leader>, :NERDTreeToggle<cr>
"Taglist
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>
"RT
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
"ctags
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