Skip to content

Commit

Permalink
move settings into ftplugin file
Browse files Browse the repository at this point in the history
  • Loading branch information
kongo2002 committed Aug 31, 2014
1 parent 243e617 commit 67a09c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 7 additions & 2 deletions 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 <kongo2002@googlemail.com>

if exists('b:did_ftplugin')
Expand Down Expand Up @@ -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',
Expand Down
5 changes: 2 additions & 3 deletions indent/fsharp.vim
Expand Up @@ -4,11 +4,13 @@
" Mike Leary <leary@nwlink.com>
" Markus Mottl <markus.mottl@gmail.com>
" Rudi Grinberg <rudi.grinberg@gmail.com>
" Gregor Uhlenheuer <kongo2002@gmail.com>
" 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 ..
Expand All @@ -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")
Expand Down

0 comments on commit 67a09c2

Please sign in to comment.