Skip to content

Commit 75db9f4

Browse files
Théophane Hufschmittjaspervdj
authored andcommitted
README: Mention vim-autoformat
A more generic and better-behaving plugin than `vim-stylish-haskell`, so worth mentioning as an alternative
1 parent 3da91c5 commit 75db9f4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.markdown

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,16 @@ Or you can define `formatprg`
124124

125125
and then use `gq`.
126126

127+
Alternatively, [vim-autoformat] supports stylish-haskell. To have it automatically reformat the files on save, add to your vimrc:
128+
129+
```vim
130+
autocmd BufWrite *.hs :Autoformat
131+
" Don't automatically indent on save, since vim's autoindent for haskell is buggy
132+
autocmd FileType haskell let b:autoformat_autoindent=0
133+
```
134+
135+
[vim-autoformat]: https://github.com/Chiel92/vim-autoformat
136+
127137
There is also the [vim-stylish-haskell] plugin, which runs stylish-haskell
128138
automatically when you save a Haskell file.
129139

0 commit comments

Comments
 (0)