summaryrefslogtreecommitdiffhomepage
path: root/README.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown10
1 files changed, 10 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown
index ea23a47..7245f10 100644
--- a/README.markdown
+++ b/README.markdown
@@ -124,6 +124,16 @@ Or you can define `formatprg`
and then use `gq`.
+Alternatively, [vim-autoformat] supports stylish-haskell. To have it automatically reformat the files on save, add to your vimrc:
+
+```vim
+autocmd BufWrite *.hs :Autoformat
+" Don't automatically indent on save, since vim's autoindent for haskell is buggy
+autocmd FileType haskell let b:autoformat_autoindent=0
+```
+
+[vim-autoformat]: https://github.com/Chiel92/vim-autoformat
+
There is also the [vim-stylish-haskell] plugin, which runs stylish-haskell
automatically when you save a Haskell file.