Skip to content

Commit

Permalink
Fix #67: don't change indentation after comment lines
Browse files Browse the repository at this point in the history
  • Loading branch information
cannorin committed Jul 4, 2023
1 parent b7ec680 commit 6f044f5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions indent/fsharp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,13 @@ function! GetFsharpIndent()

endif


" Don't change indent after lines begins with '//':
if lline =~ '^\s*//'
let i = indent(v:lnum)
return i == 0 ? ind : i
endif

" Add a 'shiftwidth' after lines ending with:
if lline =~ '\(:\|=\|->\|<-\|(\|\[\|{\|{<\|\[|\|\[<\|\<\(begin\|do\|else\|fun\|function\|functor\|if\|initializer\|object\|private\|sig\|struct\|then\|try\)\|\<object\s*(.*)\)\s*$'
let ind = ind + &sw
Expand Down

0 comments on commit 6f044f5

Please sign in to comment.