summaryrefslogtreecommitdiffstats
path: root/ftplugin/nim.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2016-01-22 09:08:30 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2016-01-22 09:08:30 +0100
commit2bde381723b9604dccb5b9dbe4588a0251ad8544 (patch)
tree4249bc219a363482c5f0e184a79eefdddb43783f /ftplugin/nim.vim
parent61390f58850c34b27d2a28dc14ebd760de152cc9 (diff)
downloadvim-polyglot-2.7.0.tar.gz
vim-polyglot-2.7.0.zip
Add nim supportv2.7.0
Diffstat (limited to 'ftplugin/nim.vim')
-rw-r--r--ftplugin/nim.vim27
1 files changed, 27 insertions, 0 deletions
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