Last active
March 29, 2016 14:40
-
-
Save ferki/0e198dce5663409c6eac to your computer and use it in GitHub Desktop.
vim-perltidy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun! Tidy() | |
silent exe ":update" | |
let pos1 = line(".") | |
exe '%!perltidy' | |
exe ':'.pos1 | |
endfun | |
autocmd BufWrite *.t,*.pm,*.pl,Rexfile call Tidy() | |
if exists("b:did_spell") | |
finish | |
endif | |
let b:did_spell = 1 " Don't load twice in one buffer | |
setlocal spell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment