summaryrefslogtreecommitdiffstats
path: root/.vimrc
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-03-01 13:35:40 +0100
committerFlorian Pritz <bluewind@xinu.at>2015-03-01 13:35:40 +0100
commitea1ba78ef274e8602fa79f3c46fa2eff2eb9c360 (patch)
tree22c204a81e25eb2d46a86441da26b12b79696b70 /.vimrc
parentacaa01a2f6805a0be55565504ccd331c19dd3fae (diff)
downloaddotfiles-ea1ba78ef274e8602fa79f3c46fa2eff2eb9c360.tar.gz
dotfiles-ea1ba78ef274e8602fa79f3c46fa2eff2eb9c360.tar.xz
vimrc: misc
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc26
1 files changed, 16 insertions, 10 deletions
diff --git a/.vimrc b/.vimrc
index 49ab84c..59681e1 100644
--- a/.vimrc
+++ b/.vimrc
@@ -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