Skip to content

Instantly share code, notes, and snippets.

@ferki
Last active March 29, 2016 14:40
Show Gist options
  • Save ferki/0e198dce5663409c6eac to your computer and use it in GitHub Desktop.
Save ferki/0e198dce5663409c6eac to your computer and use it in GitHub Desktop.
vim-perltidy
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