diff options
-rw-r--r-- | README.markdown | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown index d5af4fe..5cd3272 100644 --- a/README.markdown +++ b/README.markdown @@ -100,6 +100,21 @@ Just call or add a keybinding for it. +To run stylish-haskell each time you save a .hs file, add this to your .vimrc: + + augroup stylish-haskell + autocmd! + autocmd BufWritePost *.hs call s:StylishHaskell() + augroup END + + function! s:StylishHaskell() + let cursor_position = getpos('.') + undojoin + %!stylish-haskell + call setpos('.', cursor_position) + endfunction + + Emacs integration ----------------- |