diff options
-rw-r--r-- | .vimrc | 26 |
1 files changed, 16 insertions, 10 deletions
@@ -99,7 +99,13 @@ NeoBundleCheck "aliases cnorea w!! w !sudo tee "%" > /dev/null cnorea qpd %!perl -pe 's/\=([0-9A-Fa-f]{2})/chr(hex($1))/ge; s/\=\n//;' -com -range=% Fb :exec "<line1>,<line2>w !fb -e " . &filetype . " -n " . expand("%:t") +function Filebin(start, end) + let range = expand(a:start) . "," . expand(a:end) + silent exe expand(range) . "w !fb -n " . expand("%:t") . " -e " . expand(&ft) + redraw! +endfunction + +com! -nargs=0 -range=% Fb :call Filebin(<line1>, <line2>) syntax on @@ -111,10 +117,8 @@ autocmd BufReadPost * \ exe "normal! g`\"" | \ endif -if !exists(":DiffOrig") - command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis - \ | wincmd p | diffthis -endif +command! DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis + \ | wincmd p | diffthis set runtimepath+=/usr/share/vim @@ -238,8 +242,10 @@ autocmd FileType python setlocal omnifunc=pythoncomplete#Complete autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags autocmd FileType php set foldmethod=syntax autocmd FileType php set foldlevelstart=2 foldnestmax=2 -autocmd FileType php let g:php_folding=2 -autocmd FileType php let g:php_htmlInStrings=1 +autocmd FileType php let g:php_folding=1 + +autocmd FileType python set foldmethod=indent +autocmd FileType python set foldlevelstart=2 foldnestmax=2 autocmd FileType make setlocal noexpandtab au FileType python set ts=4 sw=4 softtabstop=4 et @@ -274,9 +280,9 @@ au FileType tex map <F10> :!texi2pdf -c %<CR> nmap <c-b> :call BlameCurrentLine()<cr> " Get the current line number & file name, view the git commit that inserted it fun! BlameCurrentLine() -let lnum = line(".") -let file = @% -exec "!gitBlameFromLineNo " lnum file + let lnum = line(".") + let file = @% + exec "!gitBlameFromLineNo " lnum file endfun map <F12> <ESC>ggg?G``" apply rot13 for people snooping over shoulder, good fun |