summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2014-03-14 15:56:45 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2014-03-14 15:56:45 +0100
commit5f5583a2302a236936644887b70ab6c721adbec1 (patch)
treeffbfff6c205c06fd229ae209d77112596c6a5b25
parent0770db2a0a80a3dd08318413faa7ea1116466716 (diff)
parent534dc94ab63dad8e10b4c6da9494c91ce83afe52 (diff)
downloadstylish-haskell-5f5583a2302a236936644887b70ab6c721adbec1.tar.gz
Merge pull request #56 from nbouscal/patch-1
Add better vim integration to readme
-rw-r--r--README.markdown14
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
-----------------