diff --git a/ftplugin/fsharp.vim b/ftplugin/fsharp.vim index 43b3f5a..af4bd77 100644 --- a/ftplugin/fsharp.vim +++ b/ftplugin/fsharp.vim @@ -1,6 +1,6 @@ " Vim filetype plugin " Language: F# -" Last Change: Fri 18 May 2012 01:59:07 AM CEST +" Last Change: Sun 31 Aug 2014 06:55:32 PM CEST " Maintainer: Gregor Uhlenheuer if exists('b:did_ftplugin') @@ -39,8 +39,13 @@ setl formatoptions=croql setl commentstring=(*%s*) setl comments=s0:*\ -,m0:*\ \ ,ex0:*),s1:(*,mb:*,ex:*),:\/\/\/,:\/\/ +" tab/indentation settings +setl expandtab +setl nolisp +setl nosmartindent + " make ftplugin undo-able -let b:undo_ftplugin = 'setl fo< cms< com< fdm<' +let b:undo_ftplugin = 'setl fo< cms< com< fdm< et< si< lisp<' let s:candidates = [ 'fsi', \ 'fsi.exe', diff --git a/indent/fsharp.vim b/indent/fsharp.vim index 36c2ff8..601d2e2 100644 --- a/indent/fsharp.vim +++ b/indent/fsharp.vim @@ -4,11 +4,13 @@ " Mike Leary " Markus Mottl " Rudi Grinberg +" Gregor Uhlenheuer " Last Change: 2013 Jun 29 " 2005 Jun 25 - Fixed multiple bugs due to 'else\nreturn ind' working " 2005 May 09 - Added an option to not indent OCaml-indents specially (MM) " 2013 June - commented textwidth (Marc Weber) " 2014 August - Ported to F# +" 2014 August - F# specific cleanup " " Marc Weber's comment: This file may contain a lot of (very custom) stuff " which eventually should be moved somewhere else .. @@ -20,11 +22,8 @@ if exists("b:did_indent") endif let b:did_indent = 1 -setlocal expandtab setlocal indentexpr=GetFsharpIndent() setlocal indentkeys+=0=and,0=class,0=constraint,0=done,0=else,0=end,0=exception,0=external,0=if,0=in,0=include,0=inherit,0=let,0=method,0=open,0=then,0=type,0=val,0=with,0;;,0>\],0\|\],0>},0\|,0},0\],0) -setlocal nolisp -setlocal nosmartindent " Only define the function once. if exists("*GetFsharpIndent")