From 2bde381723b9604dccb5b9dbe4588a0251ad8544 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Fri, 22 Jan 2016 09:08:30 +0100 Subject: Add nim support --- ftplugin/nim.vim | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 ftplugin/nim.vim (limited to 'ftplugin') diff --git a/ftplugin/nim.vim b/ftplugin/nim.vim new file mode 100644 index 00000000..5f3e93d0 --- /dev/null +++ b/ftplugin/nim.vim @@ -0,0 +1,27 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nim') == -1 + +if exists("b:nim_loaded") + finish +endif + +let b:nim_loaded = 1 + +let s:cpo_save = &cpo +set cpo&vim + +call nim#init() + +setlocal formatoptions-=t formatoptions+=croql +setlocal comments=:##,:# +setlocal commentstring=#\ %s +setlocal omnifunc=NimComplete +setlocal suffixesadd=.nim +setlocal expandtab "Make sure that only spaces are used + +compiler nim + +let &cpo = s:cpo_save +unlet s:cpo_save + + +endif -- cgit v1.2.3