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 --- compiler/nim.vim | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 compiler/nim.vim (limited to 'compiler/nim.vim') diff --git a/compiler/nim.vim b/compiler/nim.vim new file mode 100644 index 00000000..47886ed3 --- /dev/null +++ b/compiler/nim.vim @@ -0,0 +1,27 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nim') == -1 + +if exists("current_compiler") + finish +endif + +let current_compiler = "nim" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +endif + +let s:cpo_save = &cpo +set cpo-=C + +CompilerSet makeprg=nim\ c\ $* + +CompilerSet errorformat= + \%-GHint:\ %m, + \%E%f(%l\\,\ %c)\ Error:\ %m, + \%W%f(%l\\,\ %c)\ Hint:\ %m + +let &cpo = s:cpo_save +unlet s:cpo_save + + +endif -- cgit v1.2.3