diff options
author | Théophane Hufschmitt <regnat@users.noreply.github.com> | 2018-06-29 17:00:13 +0200 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2019-01-02 11:53:34 +0100 |
commit | 75db9f48d699d866e19f408d057f486175127e4a (patch) | |
tree | b08524ed55213bc73ad68fb629cf0832faa81eeb | |
parent | 3da91c53431af1b43dda27316588502ab113f7ec (diff) | |
download | stylish-haskell-75db9f48d699d866e19f408d057f486175127e4a.tar.gz |
README: Mention vim-autoformat
A more generic and better-behaving plugin than `vim-stylish-haskell`, so worth mentioning as an alternative
-rw-r--r-- | README.markdown | 10 |
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. |