File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,13 @@ To configure indentation in `haskell-vim` you can use the following variables to
100
100
f x y
101
101
>>|
102
102
103
+ ` haskell-vim ` also supports an alterative style for ` case ` indentation.
104
+
105
+ * ` let g:haskell_indent_case_alternative = 1 `
106
+
107
+ f xs ys = case xs of
108
+ >>[] -> ...
109
+ >>(y:ys) -> ...
103
110
104
111
105
112
#### Cabal
Original file line number Diff line number Diff line change @@ -268,7 +268,11 @@ function! GetHaskellIndent()
268
268
" case foo of
269
269
" >>bar -> quux
270
270
if l: prevline = ~ ' \C\<case\>.\+\<of\>\s*$'
271
- return match (l: prevline , ' \C\<case\>' ) + g: haskell_indent_case
271
+ if exists (' g:haskell_indent_case_alternative' ) && g: haskell_indent_case_alternative
272
+ return match (l: prevline , ' \S' ) + &shiftwidth
273
+ else
274
+ return match (l: prevline , ' \C\<case\>' ) + g: haskell_indent_case
275
+ endif
272
276
endif
273
277
274
278
" " where foo
You can’t perform that action at this time.
0 commit comments