When I turn on autoindent
for a regular * .hs file, after pressing Enter, the new line is indented as expected. However, this does not work with literate Haskell * .lhs files whose lines of code begin with >
(AKA "bird-tracks"). The cursor is always in the first column.
How to configure vim so that when I am inside a piece of code in a * .lhs file (and let \ s say that it has autoindent
), pressing Enter creates a track with a bird on a new line and indents accordingly?
Update: To give an example, let's say
> myfn x | x <= 0 = 0 > | x == 1 = 1β
where β
denotes the cursor position (I hope you have no problem viewing the Unicode character.) If I press Enter, I end up
> myfn x | x <= 0 = 0 > | x == 1 = 1 β
then how i want
> myfn x | x <= 0 = 0 > | x == 1 = 1 > β
source share