diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2014-03-14 15:56:45 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2014-03-14 15:56:45 +0100 |
commit | 5f5583a2302a236936644887b70ab6c721adbec1 (patch) | |
tree | ffbfff6c205c06fd229ae209d77112596c6a5b25 | |
parent | 0770db2a0a80a3dd08318413faa7ea1116466716 (diff) | |
parent | 534dc94ab63dad8e10b4c6da9494c91ce83afe52 (diff) | |
download | stylish-haskell-5f5583a2302a236936644887b70ab6c721adbec1.tar.gz |
Merge pull request #56 from nbouscal/patch-1
Add better vim integration to readme
-rw-r--r-- | README.markdown | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown index d5af4fe..2bc3ca6 100644 --- a/README.markdown +++ b/README.markdown @@ -100,6 +100,20 @@ 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('.') + %!stylish-haskell + call setpos('.', cursor_position) + endfunction + + Emacs integration ----------------- |