From 44750377f7deb1b87316e11235d6cdacd2dd4d45 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Fri, 26 Aug 2011 15:48:16 +0300 Subject: [PATCH] few fixes for the commenting and line wrapping behaviour --- compiler/nimrod.vim | 8 ++++++++ ftplugin/nimrod.vim | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/compiler/nimrod.vim b/compiler/nimrod.vim index f7dd598..8f52618 100644 --- a/compiler/nimrod.vim +++ b/compiler/nimrod.vim @@ -8,6 +8,9 @@ if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal endif +let s:cpo_save = &cpo +set cpo-=C + CompilerSet makeprg=nimrod\ c\ $* CompilerSet errorformat= @@ -15,3 +18,8 @@ CompilerSet errorformat= \%f(%l,\ %c)\ Hint:\ %m, \%f(%l,\ %c)\ Warning:\ %m +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8: + diff --git a/ftplugin/nimrod.vim b/ftplugin/nimrod.vim index 6950def..93924ca 100644 --- a/ftplugin/nimrod.vim +++ b/ftplugin/nimrod.vim @@ -7,3 +7,10 @@ let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim +setlocal formatoptions-=t formatoptions+=croql +setlocal comments=:# +setlocal commentstring=#\ %s + +let &cpo = s:cpo_save +unlet s:cpo_save +