2010-11-30 12:26:57 +11:00
|
|
|
set nocompatible
|
|
|
|
|
2011-02-21 15:56:13 +11:00
|
|
|
" For when you forget to sudo.. Really Write the file.
|
|
|
|
cmap w!! w !sudo tee % >/dev/null
|
|
|
|
|
2010-12-22 00:14:07 +11:00
|
|
|
" This helps with RVM etc
|
2011-02-21 15:50:23 +11:00
|
|
|
set shell=zsh
|
2010-12-22 00:14:07 +11:00
|
|
|
|
2010-12-06 13:06:09 +11:00
|
|
|
" CTags
|
|
|
|
map <Leader>rt :!ctags --extra=+f -R *<CR><CR>
|
2011-09-21 08:26:27 +10:00
|
|
|
set tags=tmp/tags;/,./tmp/tags;/,tags;/,./tags;/
|
2010-12-06 13:06:09 +11:00
|
|
|
|
2011-03-24 16:28:27 +11:00
|
|
|
cmap <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
|
|
|
|
\ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
|
|
|
|
\ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
|
|
|
|
|
2010-12-22 00:14:07 +11:00
|
|
|
let g:ragtag_global_maps = 1
|
2010-11-30 01:03:50 +11:00
|
|
|
|
2011-01-15 16:32:50 +11:00
|
|
|
" Align cucumber tables
|
|
|
|
inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a
|
|
|
|
|
|
|
|
function! s:align()
|
|
|
|
let p = '^\s*|\s.*\s|\s*$'
|
|
|
|
if exists(':Tabularize') && getline('.') =~# '^\s*|' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p)
|
|
|
|
let column = strlen(substitute(getline('.')[0:col('.')],'[^|]','','g'))
|
|
|
|
let position = strlen(matchstr(getline('.')[0:col('.')],'.*|\s*\zs.*'))
|
|
|
|
Tabularize/|/l1
|
|
|
|
normal! 0
|
|
|
|
call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))
|
|
|
|
endif
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
" Prevents '<Plug>DiscretionaryEnd' being inserted when pressing <Enter> in
|
|
|
|
" insert mode on new files. Blame SuperTab
|
|
|
|
let g:SuperTabCrMapping = 0
|
|
|
|
let g:SuperTabDefaultCompletionType = "context"
|
2010-12-22 00:14:07 +11:00
|
|
|
|
2011-02-18 12:45:40 +11:00
|
|
|
" snipMate config
|
|
|
|
let g:snips_author = 'Bodaniel Jeanes'
|
2011-02-09 00:44:55 +11:00
|
|
|
|
2011-04-26 14:50:22 +10:00
|
|
|
"clojure
|
|
|
|
let vimclojure#ParenRainbow=1
|
|
|
|
autocmd FileType clojure AutoCloseOff
|
|
|
|
|
2011-02-18 12:45:40 +11:00
|
|
|
" Quick editing of common dot-files
|
2011-02-09 00:42:20 +11:00
|
|
|
map <Leader>vv :edit $MYVIMRC<CR>
|
|
|
|
map <Leader>gg :edit $MYGVIMRC<CR>
|
2011-09-21 08:26:27 +10:00
|
|
|
map <Leader>.. :cd ~/.config<CR>:enew<CR>
|
|
|
|
|
|
|
|
source ~/.vim/ui.vim
|
|
|
|
source ~/.vim/autocommands.vim
|
|
|
|
source ~/.vim/bundles.vim
|
2011-02-09 00:42:20 +11:00
|
|
|
|
2011-01-15 16:32:50 +11:00
|
|
|
if filereadable(expand('~/.vimrc.local'))
|
|
|
|
source ~/.vimrc.local
|
|
|
|
endif
|
2011-02-09 00:42:20 +11:00
|
|
|
|