summaryrefslogtreecommitdiff
path: root/runtime/ftplugin
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r--runtime/ftplugin/a2ps.vim8
-rw-r--r--runtime/ftplugin/alsaconf.vim8
-rw-r--r--runtime/ftplugin/arch.vim8
-rw-r--r--runtime/ftplugin/automake.vim8
-rw-r--r--runtime/ftplugin/bdf.vim8
-rw-r--r--runtime/ftplugin/calendar.vim8
-rw-r--r--runtime/ftplugin/cdrdaoconf.vim6
-rw-r--r--runtime/ftplugin/conf.vim8
-rw-r--r--runtime/ftplugin/context.vim5
-rw-r--r--runtime/ftplugin/crm.vim8
-rw-r--r--runtime/ftplugin/css.vim8
-rw-r--r--runtime/ftplugin/cvsrc.vim8
-rw-r--r--runtime/ftplugin/denyhosts.vim6
-rw-r--r--runtime/ftplugin/dictconf.vim8
-rw-r--r--runtime/ftplugin/dictdconf.vim8
-rw-r--r--runtime/ftplugin/dircolors.vim8
-rw-r--r--runtime/ftplugin/dosini.vim8
-rw-r--r--runtime/ftplugin/dtd.vim10
-rw-r--r--runtime/ftplugin/elinks.vim8
-rw-r--r--runtime/ftplugin/eterm.vim8
-rw-r--r--runtime/ftplugin/fetchmail.vim8
-rw-r--r--runtime/ftplugin/framescript.vim30
-rw-r--r--runtime/ftplugin/git.vim4
-rw-r--r--runtime/ftplugin/gpg.vim8
-rw-r--r--runtime/ftplugin/group.vim8
-rw-r--r--runtime/ftplugin/grub.vim8
-rw-r--r--runtime/ftplugin/haskell.vim8
-rw-r--r--runtime/ftplugin/help.vim8
-rw-r--r--runtime/ftplugin/hostconf.vim6
-rw-r--r--runtime/ftplugin/hostsaccess.vim19
-rw-r--r--runtime/ftplugin/html.vim10
-rw-r--r--runtime/ftplugin/indent.vim8
-rw-r--r--runtime/ftplugin/kconfig.vim8
-rw-r--r--runtime/ftplugin/ld.vim8
-rw-r--r--runtime/ftplugin/lftp.vim8
-rw-r--r--runtime/ftplugin/libao.vim8
-rw-r--r--runtime/ftplugin/limits.vim8
-rw-r--r--runtime/ftplugin/loginaccess.vim8
-rw-r--r--runtime/ftplugin/logindefs.vim8
-rw-r--r--runtime/ftplugin/m4.vim8
-rw-r--r--runtime/ftplugin/mailaliases.vim8
-rw-r--r--runtime/ftplugin/mailcap.vim8
-rw-r--r--runtime/ftplugin/manconf.vim8
-rw-r--r--runtime/ftplugin/mf.vim7
-rw-r--r--runtime/ftplugin/modconf.vim8
-rw-r--r--runtime/ftplugin/mp.vim8
-rw-r--r--runtime/ftplugin/mplayerconf.vim8
-rw-r--r--runtime/ftplugin/muttrc.vim6
-rw-r--r--runtime/ftplugin/nanorc.vim8
-rw-r--r--runtime/ftplugin/netrc.vim8
-rw-r--r--runtime/ftplugin/nsis.vim22
-rw-r--r--runtime/ftplugin/ocaml.vim39
-rw-r--r--runtime/ftplugin/pamconf.vim8
-rw-r--r--runtime/ftplugin/passwd.vim8
-rw-r--r--runtime/ftplugin/perl.vim5
-rw-r--r--runtime/ftplugin/pinfo.vim8
-rw-r--r--runtime/ftplugin/procmail.vim8
-rw-r--r--runtime/ftplugin/prolog.vim8
-rw-r--r--runtime/ftplugin/protocols.vim8
-rw-r--r--runtime/ftplugin/quake.vim8
-rw-r--r--runtime/ftplugin/racc.vim8
-rw-r--r--runtime/ftplugin/readline.vim8
-rw-r--r--runtime/ftplugin/rnc.vim8
-rw-r--r--runtime/ftplugin/rst.vim8
-rw-r--r--runtime/ftplugin/screen.vim8
-rw-r--r--runtime/ftplugin/sensors.vim8
-rw-r--r--runtime/ftplugin/services.vim8
-rw-r--r--runtime/ftplugin/setserial.vim8
-rw-r--r--runtime/ftplugin/sieve.vim8
-rw-r--r--runtime/ftplugin/slpconf.vim8
-rw-r--r--runtime/ftplugin/slpreg.vim8
-rw-r--r--runtime/ftplugin/slpspi.vim8
-rw-r--r--runtime/ftplugin/sshconfig.vim8
-rw-r--r--runtime/ftplugin/sudoers.vim8
-rw-r--r--runtime/ftplugin/sysctl.vim8
-rw-r--r--runtime/ftplugin/terminfo.vim8
-rw-r--r--runtime/ftplugin/udevconf.vim8
-rw-r--r--runtime/ftplugin/udevperm.vim8
-rw-r--r--runtime/ftplugin/udevrules.vim8
-rw-r--r--runtime/ftplugin/updatedb.vim8
-rw-r--r--runtime/ftplugin/xdefaults.vim8
-rw-r--r--runtime/ftplugin/xf86conf.vim8
-rw-r--r--runtime/ftplugin/xinetd.vim8
-rw-r--r--runtime/ftplugin/xml.vim11
-rw-r--r--runtime/ftplugin/xmodmap.vim8
-rw-r--r--runtime/ftplugin/yaml.vim8
-rw-r--r--runtime/ftplugin/zsh.vim8
87 files changed, 654 insertions, 108 deletions
diff --git a/runtime/ftplugin/a2ps.vim b/runtime/ftplugin/a2ps.vim
index a596fc839..665335194 100644
--- a/runtime/ftplugin/a2ps.vim
+++ b/runtime/ftplugin/a2ps.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: a2ps(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< inc< fo<"
setlocal comments=:# commentstring=#\ %s include=^\\s*Include:
setlocal formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/alsaconf.vim b/runtime/ftplugin/alsaconf.vim
index 0ef6991d3..5d763c801 100644
--- a/runtime/ftplugin/alsaconf.vim
+++ b/runtime/ftplugin/alsaconf.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: alsaconf(8) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/arch.vim b/runtime/ftplugin/arch.vim
index 2da9e40ac..71d831e11 100644
--- a/runtime/ftplugin/arch.vim
+++ b/runtime/ftplugin/arch.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: GNU Arch inventory file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/automake.vim b/runtime/ftplugin/automake.vim
index c48ea13e1..20b06af36 100644
--- a/runtime/ftplugin/automake.vim
+++ b/runtime/ftplugin/automake.vim
@@ -1,10 +1,16 @@
" Vim filetype plugin file
" Language: Automake
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
+let s:cpo_save = &cpo
+set cpo&vim
+
runtime! ftplugin/make.vim ftplugin/make_*.vim ftplugin/make/*.vim
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/bdf.vim b/runtime/ftplugin/bdf.vim
index a010c2c5a..120c5df96 100644
--- a/runtime/ftplugin/bdf.vim
+++ b/runtime/ftplugin/bdf.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: BDF font definition
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=b:COMMENT commentstring=COMMENT\ %s
setlocal formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/calendar.vim b/runtime/ftplugin/calendar.vim
index ca5651118..6f117e36e 100644
--- a/runtime/ftplugin/calendar.vim
+++ b/runtime/ftplugin/calendar.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: calendar(1) input file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< inc< fo<"
setlocal comments=s1:/*,mb:*,ex:*/ commentstring& include&
setlocal formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/cdrdaoconf.vim b/runtime/ftplugin/cdrdaoconf.vim
index 86796eb8e..557fd82c5 100644
--- a/runtime/ftplugin/cdrdaoconf.vim
+++ b/runtime/ftplugin/cdrdaoconf.vim
@@ -1,6 +1,6 @@
" Vim filetype plugin file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2007-09-18
+" Latest Revision: 2007-12-04
if exists("b:did_ftplugin")
finish
@@ -14,5 +14,5 @@ let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
-let s:cpo_save = &cpo
-set cpo&vim
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/conf.vim b/runtime/ftplugin/conf.vim
index 8e0b7f8d2..1b110e475 100644
--- a/runtime/ftplugin/conf.vim
+++ b/runtime/ftplugin/conf.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: generic configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/context.vim b/runtime/ftplugin/context.vim
index c74be0714..1c7d67837 100644
--- a/runtime/ftplugin/context.vim
+++ b/runtime/ftplugin/context.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: ConTeXt typesetting engine
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
@@ -29,8 +29,7 @@ if exists("loaded_matchit")
let b:match_skip = 'r:\\\@<!\%(\\\\\)*%'
let b:match_words = '(:),\[:],{:},\\(:\\),\\\[:\\],' .
\ '\\start\(\a\+\):\\stop\1'
-endif " exists("loaded_matchit")
-
+endif
let &cpo = s:cpo_save
unlet s:cpo_save
diff --git a/runtime/ftplugin/crm.vim b/runtime/ftplugin/crm.vim
index 8ec42a90c..e86e68306 100644
--- a/runtime/ftplugin/crm.vim
+++ b/runtime/ftplugin/crm.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: CRM114
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/css.vim b/runtime/ftplugin/css.vim
index d80582e2f..43d1edfa5 100644
--- a/runtime/ftplugin/css.vim
+++ b/runtime/ftplugin/css.vim
@@ -1,13 +1,16 @@
" Vim filetype plugin file
" Language: CSS
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2007-05-08
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< inc< fo< ofu<"
setlocal comments=s1:/*,mb:*,ex:*/ commentstring&
@@ -15,3 +18,6 @@ setlocal formatoptions-=t formatoptions+=croql
setlocal omnifunc=csscomplete#CompleteCSS
let &l:include = '^\s*@import\s\+\%(url(\)\='
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/cvsrc.vim b/runtime/ftplugin/cvsrc.vim
index 2a49f8d60..c41053058 100644
--- a/runtime/ftplugin/cvsrc.vim
+++ b/runtime/ftplugin/cvsrc.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: cvs(1) RC file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments= commentstring= formatoptions-=tcroql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/denyhosts.vim b/runtime/ftplugin/denyhosts.vim
index 86796eb8e..557fd82c5 100644
--- a/runtime/ftplugin/denyhosts.vim
+++ b/runtime/ftplugin/denyhosts.vim
@@ -1,6 +1,6 @@
" Vim filetype plugin file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2007-09-18
+" Latest Revision: 2007-12-04
if exists("b:did_ftplugin")
finish
@@ -14,5 +14,5 @@ let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
-let s:cpo_save = &cpo
-set cpo&vim
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/dictconf.vim b/runtime/ftplugin/dictconf.vim
index 6ebd94adf..659046c17 100644
--- a/runtime/ftplugin/dictconf.vim
+++ b/runtime/ftplugin/dictconf.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: dict(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/dictdconf.vim b/runtime/ftplugin/dictdconf.vim
index bda87821a..ee738c50c 100644
--- a/runtime/ftplugin/dictdconf.vim
+++ b/runtime/ftplugin/dictdconf.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: dictd(8) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/dircolors.vim b/runtime/ftplugin/dircolors.vim
index bdbecc019..3b3d046e3 100644
--- a/runtime/ftplugin/dircolors.vim
+++ b/runtime/ftplugin/dircolors.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: dircolors(1) input file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/dosini.vim b/runtime/ftplugin/dosini.vim
index 354b093ee..461403ca9 100644
--- a/runtime/ftplugin/dosini.vim
+++ b/runtime/ftplugin/dosini.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: Configuration File (ini file) for MSDOS/MS Windows
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2007-08-23
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:; commentstring=;\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/dtd.vim b/runtime/ftplugin/dtd.vim
index 991118779..3b15bda3c 100644
--- a/runtime/ftplugin/dtd.vim
+++ b/runtime/ftplugin/dtd.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: dtd
" Maintainer: Dan Sharp <dwsharp at hotmail dot com>
-" Last Changed: 2003 Sep 29
+" Last Changed: 30 Jun 2008
" URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin
if exists("b:did_ftplugin") | finish | endif
@@ -13,6 +13,12 @@ let s:save_cpo = &cpo
set cpo-=C
setlocal commentstring=<!--%s-->
+setlocal comments=s:<!--,m:\ \ \ \ \ ,e:-->
+
+setlocal formatoptions-=t
+if !exists("g:ft_dtd_autocomment") || (g:ft_dtd_autocomment == 1)
+ setlocal formatoptions+=croql
+endif
if exists("loaded_matchit")
let b:match_words = '<!--:-->,<!:>'
@@ -26,7 +32,7 @@ if has("gui_win32")
endif
" Undo the stuff we changed.
-let b:undo_ftplugin = "setlocal commentstring<" .
+let b:undo_ftplugin = "setlocal commentstring< comments< formatoptions<" .
\ " | unlet! b:matchwords b:browsefilter"
" Restore the saved compatibility options.
diff --git a/runtime/ftplugin/elinks.vim b/runtime/ftplugin/elinks.vim
index c7c11f642..7d9257566 100644
--- a/runtime/ftplugin/elinks.vim
+++ b/runtime/ftplugin/elinks.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: elinks(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/eterm.vim b/runtime/ftplugin/eterm.vim
index df5bf5007..e072c638b 100644
--- a/runtime/ftplugin/eterm.vim
+++ b/runtime/ftplugin/eterm.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: eterm(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< inc< fo<"
setlocal comments=:# commentstring=#\ %s include=^\\s*include
setlocal formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/fetchmail.vim b/runtime/ftplugin/fetchmail.vim
index 174ed448b..a0d4650c0 100644
--- a/runtime/ftplugin/fetchmail.vim
+++ b/runtime/ftplugin/fetchmail.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: fetchmail(1) RC File
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/framescript.vim b/runtime/ftplugin/framescript.vim
new file mode 100644
index 000000000..805401a89
--- /dev/null
+++ b/runtime/ftplugin/framescript.vim
@@ -0,0 +1,30 @@
+" Vim ftplugin file
+" Language: FrameScript
+" Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-19
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+if exists("b:did_ftplugin")
+ finish
+endif
+let b:did_ftplugin = 1
+
+let b:undo_ftplugin = "setl com< cms< fo< inc< | unlet! b:matchwords"
+
+setlocal comments=s1:/*,mb:*,ex:*/,:// commentstring=/*\ %s\ */
+setlocal formatoptions-=t formatoptions+=croql
+setlocal include=^\\s*<#Include
+
+if exists("loaded_matchit")
+ let s:not_end = '\c\%(\<End\)\@<!'
+ let b:match_words =
+ \ s:not_end . '\<If\>:\c\<ElseIf\>:\c\<Else\>:\c\<EndIf\>,' .
+ \ s:not_end . '\<Loop\>:\c\<EndLoop\>' .
+ \ s:not_end . '\<Sub\>:\c\<EndSub\>'
+ unlet s:not_end
+endif
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/git.vim b/runtime/ftplugin/git.vim
index f8d331faf..9ac1aa151 100644
--- a/runtime/ftplugin/git.vim
+++ b/runtime/ftplugin/git.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: generic git output
" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
-" Last Change: 2008 Jun 20
+" Last Change: 2008 Jul 30
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
@@ -22,7 +22,7 @@ endif
if exists('*shellescape') && exists('b:git_dir') && b:git_dir != ''
if b:git_dir =~# '/\.git$' " Not a bare repository
- let &l:path = escape(fnamemodify(b:git_dir,':t'),'\, ').','.&l:path
+ let &l:path = escape(fnamemodify(b:git_dir,':h'),'\, ').','.&l:path
endif
let &l:path = escape(b:git_dir,'\, ').','.&l:path
let &l:keywordprg = 'git --git-dir='.shellescape(b:git_dir).' show'
diff --git a/runtime/ftplugin/gpg.vim b/runtime/ftplugin/gpg.vim
index d4bed143b..5caa1f69c 100644
--- a/runtime/ftplugin/gpg.vim
+++ b/runtime/ftplugin/gpg.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: gpg(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/group.vim b/runtime/ftplugin/group.vim
index 447ba183c..eef3cd68d 100644
--- a/runtime/ftplugin/group.vim
+++ b/runtime/ftplugin/group.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: group(5) user group file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/grub.vim b/runtime/ftplugin/grub.vim
index 162fcd3eb..21c4e3609 100644
--- a/runtime/ftplugin/grub.vim
+++ b/runtime/ftplugin/grub.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: grub(8) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/haskell.vim b/runtime/ftplugin/haskell.vim
index f5a3a807a..144f9f686 100644
--- a/runtime/ftplugin/haskell.vim
+++ b/runtime/ftplugin/haskell.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: Haskell
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=s1fl:{-,mb:-,ex:-},:-- commentstring=--\ %s
setlocal formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/help.vim b/runtime/ftplugin/help.vim
index 46c844ca2..5c6dac821 100644
--- a/runtime/ftplugin/help.vim
+++ b/runtime/ftplugin/help.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: Vim help file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl fo< tw<"
setlocal formatoptions+=tcroql textwidth=78
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/hostconf.vim b/runtime/ftplugin/hostconf.vim
index 86796eb8e..557fd82c5 100644
--- a/runtime/ftplugin/hostconf.vim
+++ b/runtime/ftplugin/hostconf.vim
@@ -1,6 +1,6 @@
" Vim filetype plugin file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2007-09-18
+" Latest Revision: 2007-12-04
if exists("b:did_ftplugin")
finish
@@ -14,5 +14,5 @@ let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
-let s:cpo_save = &cpo
-set cpo&vim
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/hostsaccess.vim b/runtime/ftplugin/hostsaccess.vim
new file mode 100644
index 000000000..a2f55acb8
--- /dev/null
+++ b/runtime/ftplugin/hostsaccess.vim
@@ -0,0 +1,19 @@
+" Vim filetype plugin file
+" Language: hosts_access(5) control file
+" Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
+
+if exists("b:did_ftplugin")
+ finish
+endif
+let b:did_ftplugin = 1
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+let b:undo_ftplugin = "setl com< cms< fo<"
+
+setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/html.vim b/runtime/ftplugin/html.vim
index 4797f4b46..6c8607d92 100644
--- a/runtime/ftplugin/html.vim
+++ b/runtime/ftplugin/html.vim
@@ -12,8 +12,14 @@ let b:did_ftplugin = 1
let s:save_cpo = &cpo
set cpo-=C
-setlocal commentstring=<!--%s-->
setlocal matchpairs+=<:>
+setlocal commentstring=<!--%s-->
+setlocal comments=s:<!--,m:\ \ \ \ ,e:-->
+
+if exists("g:ft_html_autocomment") && (g:ft_html_autocomment == 1)
+ setlocal formatoptions-=t formatoptions+=croql
+endif
+
if exists('&omnifunc')
" Distinguish between HTML versions
@@ -77,7 +83,7 @@ if has("gui_win32")
endif
" Undo the stuff we changed.
-let b:undo_ftplugin = "setlocal commentstring< matchpairs< omnifunc<"
+let b:undo_ftplugin = "setlocal commentstring< matchpairs< omnifunc< comments< formatoptions<" .
\ " | unlet! b:match_ignorecase b:match_skip b:match_words b:browsefilter"
" Restore the saved compatibility options.
diff --git a/runtime/ftplugin/indent.vim b/runtime/ftplugin/indent.vim
index 2047b1de0..0e195b061 100644
--- a/runtime/ftplugin/indent.vim
+++ b/runtime/ftplugin/indent.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: indent(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=s1:/*,mb:*,ex:*/ commentstring&
setlocal formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/kconfig.vim b/runtime/ftplugin/kconfig.vim
index bb932188f..1b10c86ae 100644
--- a/runtime/ftplugin/kconfig.vim
+++ b/runtime/ftplugin/kconfig.vim
@@ -1,12 +1,18 @@
" Vim filetype plugin file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-10
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/ld.vim b/runtime/ftplugin/ld.vim
index 544fc0d0e..31ce5c9ff 100644
--- a/runtime/ftplugin/ld.vim
+++ b/runtime/ftplugin/ld.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: ld(1) script
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< inc< fo<"
setlocal comments=s1:/*,mb:*,ex:*/ commentstring=/*%s*/ include=^\\s*INCLUDE
setlocal formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/lftp.vim b/runtime/ftplugin/lftp.vim
index e81684c2d..9e2eeb52c 100644
--- a/runtime/ftplugin/lftp.vim
+++ b/runtime/ftplugin/lftp.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: lftp(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/libao.vim b/runtime/ftplugin/libao.vim
index 8845b17fc..38bd3de92 100644
--- a/runtime/ftplugin/libao.vim
+++ b/runtime/ftplugin/libao.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: libao.conf(5) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/limits.vim b/runtime/ftplugin/limits.vim
index 6b18c8373..cd5b7b5c9 100644
--- a/runtime/ftplugin/limits.vim
+++ b/runtime/ftplugin/limits.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: limits(5) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/loginaccess.vim b/runtime/ftplugin/loginaccess.vim
index c5cb1b1cb..7c44f972f 100644
--- a/runtime/ftplugin/loginaccess.vim
+++ b/runtime/ftplugin/loginaccess.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: login.access(5) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/logindefs.vim b/runtime/ftplugin/logindefs.vim
index 431755e52..668d08a00 100644
--- a/runtime/ftplugin/logindefs.vim
+++ b/runtime/ftplugin/logindefs.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: login.defs(5) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/m4.vim b/runtime/ftplugin/m4.vim
index 870258409..0ffe0ac77 100644
--- a/runtime/ftplugin/m4.vim
+++ b/runtime/ftplugin/m4.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: m4
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:#,:dnl commentstring=dnl\ %s
setlocal formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/mailaliases.vim b/runtime/ftplugin/mailaliases.vim
index f52583fc8..1b10c86ae 100644
--- a/runtime/ftplugin/mailaliases.vim
+++ b/runtime/ftplugin/mailaliases.vim
@@ -1,12 +1,18 @@
" Vim filetype plugin file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-03-27
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/mailcap.vim b/runtime/ftplugin/mailcap.vim
index df4e994c0..f4c8c232d 100644
--- a/runtime/ftplugin/mailcap.vim
+++ b/runtime/ftplugin/mailcap.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: Mailcap configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/manconf.vim b/runtime/ftplugin/manconf.vim
index 69cf6f504..a249a9750 100644
--- a/runtime/ftplugin/manconf.vim
+++ b/runtime/ftplugin/manconf.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: man.conf(5) - man configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/mf.vim b/runtime/ftplugin/mf.vim
index e351a1361..fd1d3ce64 100644
--- a/runtime/ftplugin/mf.vim
+++ b/runtime/ftplugin/mf.vim
@@ -1,14 +1,19 @@
" Vim filetype plugin file
" Language: MetaFont
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:% commentstring=%\ %s formatoptions-=t formatoptions+=croql
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/modconf.vim b/runtime/ftplugin/modconf.vim
index 97102a1ee..f200e9f61 100644
--- a/runtime/ftplugin/modconf.vim
+++ b/runtime/ftplugin/modconf.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: modules.conf(5) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< inc< fo<"
setlocal comments=:# commentstring=#\ %s include=^\\s*include
setlocal formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/mp.vim b/runtime/ftplugin/mp.vim
index 370978216..316fa9bb6 100644
--- a/runtime/ftplugin/mp.vim
+++ b/runtime/ftplugin/mp.vim
@@ -1,13 +1,16 @@
" Vim filetype plugin file
" Language: MetaPost
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-07-04
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:% commentstring=%\ %s formatoptions-=t formatoptions+=croql
@@ -20,3 +23,6 @@ if exists(":FixBeginfigs") != 2
g/^beginfig(\d*);$/s//\='beginfig('.i.');'/ | let i = i + 1
endfunction
endif
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/mplayerconf.vim b/runtime/ftplugin/mplayerconf.vim
index e410667d2..65034a815 100644
--- a/runtime/ftplugin/mplayerconf.vim
+++ b/runtime/ftplugin/mplayerconf.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: mplayer(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< inc< fo<"
setlocal comments=:# commentstring=#\ %s include=^\\s*include
setlocal formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/muttrc.vim b/runtime/ftplugin/muttrc.vim
index 18b06d813..a109e5ddd 100644
--- a/runtime/ftplugin/muttrc.vim
+++ b/runtime/ftplugin/muttrc.vim
@@ -8,9 +8,15 @@ if exists("b:did_ftplugin")
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< inc< fo<"
setlocal comments=:# commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
let &l:include = '^\s*source\>'
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/nanorc.vim b/runtime/ftplugin/nanorc.vim
index 67a2a48cc..be20d1250 100644
--- a/runtime/ftplugin/nanorc.vim
+++ b/runtime/ftplugin/nanorc.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: nanorc(5) - GNU nano configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/netrc.vim b/runtime/ftplugin/netrc.vim
index 0f9417a83..105a1d3a8 100644
--- a/runtime/ftplugin/netrc.vim
+++ b/runtime/ftplugin/netrc.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: netrc(5) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/nsis.vim b/runtime/ftplugin/nsis.vim
new file mode 100644
index 000000000..acc26208c
--- /dev/null
+++ b/runtime/ftplugin/nsis.vim
@@ -0,0 +1,22 @@
+" Vim ftplugin file
+" Language: NSIS script
+" Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+if exists("b:did_ftplugin")
+ finish
+endif
+let b:did_ftplugin = 1
+
+let b:undo_ftplugin = "setl com< cms< fo< def< inc<"
+
+setlocal comments=s1:/*,mb:*,ex:*/,b:#,:; commentstring=;\ %s
+setlocal formatoptions-=t formatoptions+=croql
+setlocal define=^\\s*!define\\%(\\%(utc\\)\\=date\\|math\\)\\=
+setlocal include=^\\s*!include\\%(/NONFATAL\\)\\=
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/ocaml.vim b/runtime/ftplugin/ocaml.vim
index 53431c9b0..7acf49328 100644
--- a/runtime/ftplugin/ocaml.vim
+++ b/runtime/ftplugin/ocaml.vim
@@ -5,7 +5,8 @@
" Stefano Zacchiroli <zack@bononia.it>
" Vincent Aravantinos <firstname.name@imag.fr>
" URL: http://www.ocaml.info/vim/ftplugin/ocaml.vim
-" Last Change: 2007 Sep 09 - Added .annot support for ocamlbuild, python not
+" Last Change: 2008 Jul 17 - Bugfix related to fnameescape (VA)
+" 2007 Sep 09 - Added .annot support for ocamlbuild, python not
" needed anymore (VA)
" 2006 May 01 - Added .annot support for file.whateverext (SZ)
" 2006 Apr 11 - Fixed an initialization bug; fixed ASS abbrev (MM)
@@ -16,6 +17,17 @@ if exists("b:did_ftplugin")
endif
let b:did_ftplugin=1
+" some macro
+if exists('*fnameescape')
+ function! s:Fnameescape(s)
+ return fnameescape(a:s)
+ endfun
+else
+ function! s:Fnameescape(s)
+ return escape(a:s," \t\n*?[{`$\\%#'\"|!<")
+ endfun
+endif
+
" Error handling -- helps moving where the compiler wants you to go
let s:cposet=&cpoptions
set cpo-=C
@@ -71,14 +83,14 @@ if !exists("g:did_ocaml_switch")
map <LocalLeader>S :call OCaml_switch(1)<CR>
fun OCaml_switch(newwin)
if (match(bufname(""), "\\.mli$") >= 0)
- let fname = substitute(bufname(""), "\\.mli$", ".ml", "")
+ let fname = s:Fnameescape(substitute(bufname(""), "\\.mli$", ".ml", ""))
if (a:newwin == 1)
exec "new " . fname
else
exec "arge " . fname
endif
elseif (match(bufname(""), "\\.ml$") >= 0)
- let fname = bufname("") . "i"
+ let fname = s:Fnameescape(bufname("")) . "i"
if (a:newwin == 1)
exec "new " . fname
else
@@ -260,6 +272,7 @@ endfunction
" For the moment, the only possible keyword is \"type\"."
" >>
+
" 1. Finding the annotation file even if we use ocamlbuild
" In: two strings representing paths
@@ -286,16 +299,16 @@ endfunction
function! s:Locate_annotation()
if !b:annotation_file_located
- silent exe 'cd' expand('%:p:h')
+ silent exe 'cd' s:Fnameescape(expand('%:p:h'))
- let annot_file_name = expand('%:r').'.annot'
+ let annot_file_name = s:Fnameescape(expand('%:r')).'.annot'
" 1st case : the annot file is in the same directory as the buffer (no ocamlbuild)
let b:annot_file_path = findfile(annot_file_name,'.')
if b:annot_file_path != ''
let b:annot_file_path = getcwd().'/'.b:annot_file_path
let b:_build_path = ''
- let b:source_file_relative_path = expand('%')
+ let b:source_file_relative_path = s:Fnameescape(expand('%'))
else
" 2nd case : the buffer and the _build directory are in the same directory
" ..
@@ -310,7 +323,7 @@ endfunction
if b:annot_file_path != ''
let b:annot_file_path = getcwd().'/'.b:annot_file_path
endif
- let b:source_file_relative_path = expand('%')
+ let b:source_file_relative_path = s:Fnameescape(expand('%'))
else
" 3rd case : the _build directory is in a directory higher in the file hierarchy
" (it can't be deeper by ocamlbuild requirements)
@@ -325,9 +338,9 @@ endfunction
let b:_build_path = finddir('_build',';')
if b:_build_path != ''
let project_path = substitute(b:_build_path,'/_build$','','')
- let path_relative_to_project = substitute(expand('%:p:h'),project_path.'/','','')
+ let path_relative_to_project = s:Fnameescape(substitute(expand('%:p:h'),project_path.'/','',''))
let b:annot_file_path = findfile(annot_file_name,project_path.'/_build/'.path_relative_to_project)
- let b:source_file_relative_path = substitute(expand('%:p'),project_path.'/','','')
+ let b:source_file_relative_path = s:Fnameescape(substitute(expand('%:p'),project_path.'/','',''))
else
let b:annot_file_path = findfile(annot_file_name,'**')
"4th case : what if the user decided to change the name of the _build directory ?
@@ -339,7 +352,7 @@ endfunction
let b:annot_file_path = getcwd().'/'.b:annot_file_path
let b:_build_path = getcwd().'/'.b:_build_path
endif
- let b:source_file_relative_path = expand('%')
+ let b:source_file_relative_path = s:Fnameescape(expand('%'))
else
" 4b. anarchy : the renamed _build directory may be higher in the hierarchy
" this will work if the file for which we are looking annotations has a unique name in the whole project
@@ -380,16 +393,16 @@ endfunction
set hidden
let s:current_buf = bufname('%')
if bufloaded(b:annot_file_path)
- silent exe 'keepj keepalt' 'buffer' b:annot_file_path
+ silent exe 'keepj keepalt' 'buffer' s:Fnameescape(b:annot_file_path)
else
- silent exe 'keepj keepalt' 'view' b:annot_file_path
+ silent exe 'keepj keepalt' 'view' s:Fnameescape(b:annot_file_path)
endif
endfun
" After call:
" The original buffer has been restored in the exact same state as before.
function! s:Exit_annotation_buffer()
- silent exe 'keepj keepalt' 'buffer' s:current_buf
+ silent exe 'keepj keepalt' 'buffer' s:Fnameescape(s:current_buf)
let &l:hidden = s:current_hidden
call setpos('.',s:current_pos)
endfun
diff --git a/runtime/ftplugin/pamconf.vim b/runtime/ftplugin/pamconf.vim
index cf9707aab..96d96461e 100644
--- a/runtime/ftplugin/pamconf.vim
+++ b/runtime/ftplugin/pamconf.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: pam(8) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/passwd.vim b/runtime/ftplugin/passwd.vim
index 20f2b7f58..5088c4335 100644
--- a/runtime/ftplugin/passwd.vim
+++ b/runtime/ftplugin/passwd.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: passwd(5) password file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/perl.vim b/runtime/ftplugin/perl.vim
index 3f3e570b8..377100564 100644
--- a/runtime/ftplugin/perl.vim
+++ b/runtime/ftplugin/perl.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Perl
" Maintainer: Dan Sharp <dwsharp at hotmail dot com>
-" Last Change: 2007 Nov 30
+" Last Change: 17 Jul 2008
" URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin
if exists("b:did_ftplugin") | finish | endif
@@ -13,6 +13,7 @@ let s:save_cpo = &cpo
set cpo-=C
setlocal formatoptions+=crq
+setlocal keywordprg=perldoc\ -f
setlocal comments=:#
setlocal commentstring=#%s
@@ -63,7 +64,7 @@ let &l:path=perlpath
"---------------------------------------------
" Undo the stuff we changed.
-let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf<" .
+let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< kp<" .
\ " | unlet! b:browsefilter"
" Restore the saved compatibility options.
diff --git a/runtime/ftplugin/pinfo.vim b/runtime/ftplugin/pinfo.vim
index 7f1ecdfb5..6ec1f87b9 100644
--- a/runtime/ftplugin/pinfo.vim
+++ b/runtime/ftplugin/pinfo.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: pinfo(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/procmail.vim b/runtime/ftplugin/procmail.vim
index a8db58eb9..cc2ceede1 100644
--- a/runtime/ftplugin/procmail.vim
+++ b/runtime/ftplugin/procmail.vim
@@ -1,15 +1,21 @@
" Vim filetype plugin file
" Language: procmail(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< inc< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
let &l:include = '^\s*INCLUDERC\>'
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/prolog.vim b/runtime/ftplugin/prolog.vim
index cf191a90b..caeb574c5 100644
--- a/runtime/ftplugin/prolog.vim
+++ b/runtime/ftplugin/prolog.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: Prolog
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=s1:/*,mb:*,ex:*/,:% commentstring=%\ %s
setlocal formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/protocols.vim b/runtime/ftplugin/protocols.vim
index b3679bd59..2486ff937 100644
--- a/runtime/ftplugin/protocols.vim
+++ b/runtime/ftplugin/protocols.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: protocols(5) - Internet protocols definition file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/quake.vim b/runtime/ftplugin/quake.vim
index 25c6e7e50..f62693b11 100644
--- a/runtime/ftplugin/quake.vim
+++ b/runtime/ftplugin/quake.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: Quake[1-3] configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:// commentstring=//\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/racc.vim b/runtime/ftplugin/racc.vim
index 72c1e14cd..7ff22f893 100644
--- a/runtime/ftplugin/racc.vim
+++ b/runtime/ftplugin/racc.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: Racc input file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=s1:/*,mb:*,ex:*/,:# commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/readline.vim b/runtime/ftplugin/readline.vim
index 9656c5757..0a4dbb5c0 100644
--- a/runtime/ftplugin/readline.vim
+++ b/runtime/ftplugin/readline.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: readline(3) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/rnc.vim b/runtime/ftplugin/rnc.vim
index a5d21fb26..2b8fd50d8 100644
--- a/runtime/ftplugin/rnc.vim
+++ b/runtime/ftplugin/rnc.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: Relax NG compact syntax
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/rst.vim b/runtime/ftplugin/rst.vim
index 8fc25e9e2..b871cf148 100644
--- a/runtime/ftplugin/rst.vim
+++ b/runtime/ftplugin/rst.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: reStructuredText documentation format
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< et< fo<"
setlocal comments=fb:.. commentstring=..\ %s expandtab
setlocal formatoptions+=tcroql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/screen.vim b/runtime/ftplugin/screen.vim
index 92ce475b8..95c384955 100644
--- a/runtime/ftplugin/screen.vim
+++ b/runtime/ftplugin/screen.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: screen(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/sensors.vim b/runtime/ftplugin/sensors.vim
index e1f66fc07..813d14c0e 100644
--- a/runtime/ftplugin/sensors.vim
+++ b/runtime/ftplugin/sensors.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: sensors.conf(5) - libsensors configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/services.vim b/runtime/ftplugin/services.vim
index d670cd90a..d34349ee2 100644
--- a/runtime/ftplugin/services.vim
+++ b/runtime/ftplugin/services.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: services(5) - Internet network services list
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/setserial.vim b/runtime/ftplugin/setserial.vim
index 4b4796bc0..f9d594578 100644
--- a/runtime/ftplugin/setserial.vim
+++ b/runtime/ftplugin/setserial.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: setserial(8) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/sieve.vim b/runtime/ftplugin/sieve.vim
index d906e1987..9a8759c02 100644
--- a/runtime/ftplugin/sieve.vim
+++ b/runtime/ftplugin/sieve.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: Sieve filtering language input file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=s1:/*,mb:*,ex:*/,:# commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/slpconf.vim b/runtime/ftplugin/slpconf.vim
index 8c92a55b2..0c4568967 100644
--- a/runtime/ftplugin/slpconf.vim
+++ b/runtime/ftplugin/slpconf.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: RFC 2614 - An API for Service Location configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:#,:; commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/slpreg.vim b/runtime/ftplugin/slpreg.vim
index 07e42c1f2..e9d533e2d 100644
--- a/runtime/ftplugin/slpreg.vim
+++ b/runtime/ftplugin/slpreg.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: RFC 2614 - An API for Service Location registration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:#,:; commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/slpspi.vim b/runtime/ftplugin/slpspi.vim
index d6a675174..8d64d476f 100644
--- a/runtime/ftplugin/slpspi.vim
+++ b/runtime/ftplugin/slpspi.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: RFC 2614 - An API for Service Location SPI file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:#,:; commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/sshconfig.vim b/runtime/ftplugin/sshconfig.vim
index 3552696a6..f940af972 100644
--- a/runtime/ftplugin/sshconfig.vim
+++ b/runtime/ftplugin/sshconfig.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: OpenSSH client configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/sudoers.vim b/runtime/ftplugin/sudoers.vim
index a698f04d6..575630217 100644
--- a/runtime/ftplugin/sudoers.vim
+++ b/runtime/ftplugin/sudoers.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: sudoers(5) configuration files
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/sysctl.vim b/runtime/ftplugin/sysctl.vim
index 6b1ac6c04..fb1098dd3 100644
--- a/runtime/ftplugin/sysctl.vim
+++ b/runtime/ftplugin/sysctl.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: sysctl.conf(5) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:;,:# commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/terminfo.vim b/runtime/ftplugin/terminfo.vim
index a473bcd06..7ce31d1ca 100644
--- a/runtime/ftplugin/terminfo.vim
+++ b/runtime/ftplugin/terminfo.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: terminfo(5) definition
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/udevconf.vim b/runtime/ftplugin/udevconf.vim
index c0a09827b..6042e1441 100644
--- a/runtime/ftplugin/udevconf.vim
+++ b/runtime/ftplugin/udevconf.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: udev(8) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/udevperm.vim b/runtime/ftplugin/udevperm.vim
index 82602b1ea..e7ad31d07 100644
--- a/runtime/ftplugin/udevperm.vim
+++ b/runtime/ftplugin/udevperm.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: udev(8) permissions file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/udevrules.vim b/runtime/ftplugin/udevrules.vim
index 3cb4c3346..be8d64696 100644
--- a/runtime/ftplugin/udevrules.vim
+++ b/runtime/ftplugin/udevrules.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: udev(8) rules file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/updatedb.vim b/runtime/ftplugin/updatedb.vim
index db35fee15..f4e7bcebd 100644
--- a/runtime/ftplugin/updatedb.vim
+++ b/runtime/ftplugin/updatedb.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: updatedb.conf(5) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/xdefaults.vim b/runtime/ftplugin/xdefaults.vim
index b441dfe7f..cd851829c 100644
--- a/runtime/ftplugin/xdefaults.vim
+++ b/runtime/ftplugin/xdefaults.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: X resources files like ~/.Xdefaults (xrdb)
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< inc< fo<"
setlocal comments=s1:/*,mb:*,ex:*/,:! commentstring& inc&
setlocal formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/xf86conf.vim b/runtime/ftplugin/xf86conf.vim
index 29e9eac66..ab7569a10 100644
--- a/runtime/ftplugin/xf86conf.vim
+++ b/runtime/ftplugin/xf86conf.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: XFree86 Configuration File
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/xinetd.vim b/runtime/ftplugin/xinetd.vim
index b62dec57b..f209af18b 100644
--- a/runtime/ftplugin/xinetd.vim
+++ b/runtime/ftplugin/xinetd.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: xinetd.conf(5) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< inc< fo<"
setlocal comments=:# commentstring=#\ %s include=^\\s*include
setlocal formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/xml.vim b/runtime/ftplugin/xml.vim
index 8cff53776..55d9ee6c5 100644
--- a/runtime/ftplugin/xml.vim
+++ b/runtime/ftplugin/xml.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: xml
" Maintainer: Dan Sharp <dwsharp at hotmail dot com>
-" Last Changed: 2003 Sep 29
+" Last Changed: 30 Jun 2008
" URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin
if exists("b:did_ftplugin") | finish | endif
@@ -13,6 +13,13 @@ let s:save_cpo = &cpo
set cpo-=C
setlocal commentstring=<!--%s-->
+setlocal comments=s:<!--,m:\ \ \ \ \ ,e:-->
+
+setlocal formatoptions-=t
+if !exists("g:ft_xml_autocomment") || (g:ft_xml_autocomment == 1)
+ setlocal formatoptions+=croql
+endif
+
" XML: thanks to Johannes Zellner and Akbar Ibrahim
" - case sensitive
@@ -49,7 +56,7 @@ if has("gui_win32")
endif
" Undo the stuff we changed.
-let b:undo_ftplugin = "setlocal cms<" .
+let b:undo_ftplugin = "setlocal commentstring< comments< formatoptions<" .
\ " | unlet! b:match_ignorecase b:match_words b:browsefilter"
" Restore the saved compatibility options.
diff --git a/runtime/ftplugin/xmodmap.vim b/runtime/ftplugin/xmodmap.vim
index a0d913ea4..027ae09ff 100644
--- a/runtime/ftplugin/xmodmap.vim
+++ b/runtime/ftplugin/xmodmap.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: xmodmap(1) definition file
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:! commentstring=!\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/yaml.vim b/runtime/ftplugin/yaml.vim
index a2893cdad..b88803ab3 100644
--- a/runtime/ftplugin/yaml.vim
+++ b/runtime/ftplugin/yaml.vim
@@ -1,14 +1,20 @@
" Vim filetype plugin file
" Language: YAML (YAML Ain't Markup Language)
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< et< fo<"
setlocal comments=:# commentstring=#\ %s expandtab
setlocal formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/zsh.vim b/runtime/ftplugin/zsh.vim
index c8f82a561..c6db78171 100644
--- a/runtime/ftplugin/zsh.vim
+++ b/runtime/ftplugin/zsh.vim
@@ -1,13 +1,19 @@
" Vim filetype plugin file
" Language: Zsh shell script
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
+
+let &cpo = s:cpo_save
+unlet s:cpo_save