Skip to content

Commit 22a70da

Browse files
authored
Merge pull request #71 from ionide/fix-67
Fix #67: don't change indentation after comment lines
2 parents b7ec680 + 6f044f5 commit 22a70da

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

indent/fsharp.vim

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,13 @@ function! GetFsharpIndent()
185185

186186
endif
187187

188+
189+
" Don't change indent after lines begins with '//':
190+
if lline =~ '^\s*//'
191+
let i = indent(v:lnum)
192+
return i == 0 ? ind : i
193+
endif
194+
188195
" Add a 'shiftwidth' after lines ending with:
189196
if lline =~ '\(:\|=\|->\|<-\|(\|\[\|{\|{<\|\[|\|\[<\|\<\(begin\|do\|else\|fun\|function\|functor\|if\|initializer\|object\|private\|sig\|struct\|then\|try\)\|\<object\s*(.*)\)\s*$'
190197
let ind = ind + &sw

0 commit comments

Comments
 (0)