aboutsummaryrefslogtreecommitdiff
path: root/runtime/ftplugin
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r--runtime/ftplugin/a2ps.vim6
-rw-r--r--runtime/ftplugin/alsaconf.vim6
-rw-r--r--runtime/ftplugin/arch.vim6
-rw-r--r--runtime/ftplugin/automake.vim6
-rw-r--r--runtime/ftplugin/bdf.vim6
-rw-r--r--runtime/ftplugin/c.vim6
-rw-r--r--runtime/ftplugin/calendar.vim6
-rw-r--r--runtime/ftplugin/cdrdaoconf.vim4
-rw-r--r--runtime/ftplugin/conf.vim6
-rw-r--r--runtime/ftplugin/crm.vim6
-rw-r--r--runtime/ftplugin/css.vim6
-rw-r--r--runtime/ftplugin/cvsrc.vim6
-rw-r--r--runtime/ftplugin/denyhosts.vim4
-rw-r--r--runtime/ftplugin/dictconf.vim6
-rw-r--r--runtime/ftplugin/dictdconf.vim6
-rw-r--r--runtime/ftplugin/dircolors.vim6
-rw-r--r--runtime/ftplugin/dosini.vim6
-rw-r--r--runtime/ftplugin/elinks.vim6
-rw-r--r--runtime/ftplugin/eterm.vim6
-rw-r--r--runtime/ftplugin/fetchmail.vim6
-rw-r--r--runtime/ftplugin/framescript.vim6
-rw-r--r--runtime/ftplugin/gdb.vim12
-rw-r--r--runtime/ftplugin/gpg.vim6
-rw-r--r--runtime/ftplugin/group.vim6
-rw-r--r--runtime/ftplugin/grub.vim6
-rw-r--r--runtime/ftplugin/hamster.vim6
-rw-r--r--runtime/ftplugin/haskell.vim6
-rw-r--r--runtime/ftplugin/help.vim13
-rw-r--r--runtime/ftplugin/hostconf.vim4
-rw-r--r--runtime/ftplugin/hostsaccess.vim6
-rw-r--r--runtime/ftplugin/indent.vim6
-rw-r--r--runtime/ftplugin/ld.vim6
-rw-r--r--runtime/ftplugin/lftp.vim6
-rw-r--r--runtime/ftplugin/libao.vim6
-rw-r--r--runtime/ftplugin/limits.vim6
-rw-r--r--runtime/ftplugin/loginaccess.vim6
-rw-r--r--runtime/ftplugin/logindefs.vim6
-rw-r--r--runtime/ftplugin/m4.vim6
-rw-r--r--runtime/ftplugin/mailaliases.vim4
-rw-r--r--runtime/ftplugin/mailcap.vim6
-rw-r--r--runtime/ftplugin/man.vim6
-rw-r--r--runtime/ftplugin/manconf.vim6
-rw-r--r--runtime/ftplugin/modconf.vim6
-rw-r--r--runtime/ftplugin/mplayerconf.vim6
-rw-r--r--runtime/ftplugin/muttrc.vim6
-rw-r--r--runtime/ftplugin/nanorc.vim6
-rw-r--r--runtime/ftplugin/neomuttrc.vim23
-rw-r--r--runtime/ftplugin/netrc.vim6
-rw-r--r--runtime/ftplugin/nsis.vim6
-rw-r--r--runtime/ftplugin/pamconf.vim6
-rw-r--r--runtime/ftplugin/passwd.vim6
-rw-r--r--runtime/ftplugin/perl.vim13
-rw-r--r--runtime/ftplugin/pinfo.vim6
-rw-r--r--runtime/ftplugin/procmail.vim6
-rw-r--r--runtime/ftplugin/prolog.vim6
-rw-r--r--runtime/ftplugin/protocols.vim6
-rw-r--r--runtime/ftplugin/python.vim35
-rw-r--r--runtime/ftplugin/quake.vim6
-rw-r--r--runtime/ftplugin/racc.vim6
-rw-r--r--runtime/ftplugin/readline.vim6
-rw-r--r--runtime/ftplugin/rnc.vim6
-rw-r--r--runtime/ftplugin/rst.vim6
-rw-r--r--runtime/ftplugin/rust.vim197
-rw-r--r--runtime/ftplugin/sbt.vim15
-rw-r--r--runtime/ftplugin/screen.vim6
-rw-r--r--runtime/ftplugin/sensors.vim6
-rw-r--r--runtime/ftplugin/services.vim6
-rw-r--r--runtime/ftplugin/setserial.vim6
-rw-r--r--runtime/ftplugin/sieve.vim6
-rw-r--r--runtime/ftplugin/slpconf.vim6
-rw-r--r--runtime/ftplugin/slpreg.vim6
-rw-r--r--runtime/ftplugin/slpspi.vim6
-rw-r--r--runtime/ftplugin/sql.vim74
-rw-r--r--runtime/ftplugin/sshconfig.vim6
-rw-r--r--runtime/ftplugin/sudoers.vim6
-rw-r--r--runtime/ftplugin/sysctl.vim6
-rw-r--r--runtime/ftplugin/terminfo.vim6
-rw-r--r--runtime/ftplugin/tmux.vim12
-rw-r--r--runtime/ftplugin/treetop.vim6
-rw-r--r--runtime/ftplugin/tutor.vim19
-rw-r--r--runtime/ftplugin/udevconf.vim6
-rw-r--r--runtime/ftplugin/udevperm.vim6
-rw-r--r--runtime/ftplugin/udevrules.vim6
-rw-r--r--runtime/ftplugin/updatedb.vim6
-rw-r--r--runtime/ftplugin/verilog.vim21
-rw-r--r--runtime/ftplugin/vim.vim5
-rw-r--r--runtime/ftplugin/xdefaults.vim6
-rw-r--r--runtime/ftplugin/xf86conf.vim6
-rw-r--r--runtime/ftplugin/xinetd.vim6
-rw-r--r--runtime/ftplugin/xmodmap.vim6
-rw-r--r--runtime/ftplugin/yaml.vim6
-rw-r--r--runtime/ftplugin/zsh.vim12
92 files changed, 621 insertions, 296 deletions
diff --git a/runtime/ftplugin/a2ps.vim b/runtime/ftplugin/a2ps.vim
index 6653351949..0e24e3088f 100644
--- a/runtime/ftplugin/a2ps.vim
+++ b/runtime/ftplugin/a2ps.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: a2ps(1) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: a2ps(1) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/alsaconf.vim b/runtime/ftplugin/alsaconf.vim
index 5d763c8011..6d9d80a208 100644
--- a/runtime/ftplugin/alsaconf.vim
+++ b/runtime/ftplugin/alsaconf.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: alsaconf(8) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: alsaconf(8) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/arch.vim b/runtime/ftplugin/arch.vim
index 71d831e112..1c697b8ca1 100644
--- a/runtime/ftplugin/arch.vim
+++ b/runtime/ftplugin/arch.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: GNU Arch inventory file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: GNU Arch inventory file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/automake.vim b/runtime/ftplugin/automake.vim
index 20b06af362..9f981a7a83 100644
--- a/runtime/ftplugin/automake.vim
+++ b/runtime/ftplugin/automake.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: Automake
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: Automake
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/bdf.vim b/runtime/ftplugin/bdf.vim
index 120c5df968..85b7b4042a 100644
--- a/runtime/ftplugin/bdf.vim
+++ b/runtime/ftplugin/bdf.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: BDF font definition
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: BDF font definition
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/c.vim b/runtime/ftplugin/c.vim
index 3717ea92a9..6047f9f863 100644
--- a/runtime/ftplugin/c.vim
+++ b/runtime/ftplugin/c.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2016 Jun 12
+" Last Change: 2017 Sep 28
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -30,8 +30,8 @@ endif
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
" When the matchit plugin is loaded, this makes the % command skip parens and
-" braces in comments.
-let b:match_words = &matchpairs . ',^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>'
+" braces in comments properly.
+let b:match_words = '^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>'
let b:match_skip = 's:comment\|string\|character\|special'
" Win32 can filter files in the browse dialog
diff --git a/runtime/ftplugin/calendar.vim b/runtime/ftplugin/calendar.vim
index 6f117e36e5..f454ba1dc8 100644
--- a/runtime/ftplugin/calendar.vim
+++ b/runtime/ftplugin/calendar.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: calendar(1) input file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: calendar(1) input file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/cdrdaoconf.vim b/runtime/ftplugin/cdrdaoconf.vim
index 557fd82c53..563bb8f5f1 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-12-04
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2007-12-04
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/conf.vim b/runtime/ftplugin/conf.vim
index 1b110e475b..ff2add1fa3 100644
--- a/runtime/ftplugin/conf.vim
+++ b/runtime/ftplugin/conf.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: generic configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: generic configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/crm.vim b/runtime/ftplugin/crm.vim
index e86e683068..06baee883a 100644
--- a/runtime/ftplugin/crm.vim
+++ b/runtime/ftplugin/crm.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: CRM114
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: CRM114
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/css.vim b/runtime/ftplugin/css.vim
index 43d1edfa5b..ea4424418c 100644
--- a/runtime/ftplugin/css.vim
+++ b/runtime/ftplugin/css.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: CSS
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: CSS
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/cvsrc.vim b/runtime/ftplugin/cvsrc.vim
index c410530588..34b148409e 100644
--- a/runtime/ftplugin/cvsrc.vim
+++ b/runtime/ftplugin/cvsrc.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: cvs(1) RC file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: cvs(1) RC file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/denyhosts.vim b/runtime/ftplugin/denyhosts.vim
index 557fd82c53..563bb8f5f1 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-12-04
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2007-12-04
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/dictconf.vim b/runtime/ftplugin/dictconf.vim
index 659046c176..71a2b67258 100644
--- a/runtime/ftplugin/dictconf.vim
+++ b/runtime/ftplugin/dictconf.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: dict(1) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: dict(1) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/dictdconf.vim b/runtime/ftplugin/dictdconf.vim
index ee738c50ce..0ee4c9d7e0 100644
--- a/runtime/ftplugin/dictdconf.vim
+++ b/runtime/ftplugin/dictdconf.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: dictd(8) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: dictd(8) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/dircolors.vim b/runtime/ftplugin/dircolors.vim
index 3b3d046e36..d07d1e34da 100644
--- a/runtime/ftplugin/dircolors.vim
+++ b/runtime/ftplugin/dircolors.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: dircolors(1) input file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: dircolors(1) input file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/dosini.vim b/runtime/ftplugin/dosini.vim
index 461403ca95..0d0f0f8983 100644
--- a/runtime/ftplugin/dosini.vim
+++ b/runtime/ftplugin/dosini.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: Configuration File (ini file) for MSDOS/MS Windows
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: Configuration File (ini file) for MSDOS/MS Windows
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/elinks.vim b/runtime/ftplugin/elinks.vim
index 7d9257566b..921f9c276b 100644
--- a/runtime/ftplugin/elinks.vim
+++ b/runtime/ftplugin/elinks.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: elinks(1) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: elinks(1) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/eterm.vim b/runtime/ftplugin/eterm.vim
index e072c638b1..e2f88ef8c6 100644
--- a/runtime/ftplugin/eterm.vim
+++ b/runtime/ftplugin/eterm.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: eterm(1) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: eterm(1) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/fetchmail.vim b/runtime/ftplugin/fetchmail.vim
index a0d4650c03..33bb417be4 100644
--- a/runtime/ftplugin/fetchmail.vim
+++ b/runtime/ftplugin/fetchmail.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: fetchmail(1) RC File
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: fetchmail(1) RC File
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/framescript.vim b/runtime/ftplugin/framescript.vim
index 805401a89b..48fe0ace7c 100644
--- a/runtime/ftplugin/framescript.vim
+++ b/runtime/ftplugin/framescript.vim
@@ -1,7 +1,7 @@
" Vim ftplugin file
-" Language: FrameScript
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-19
+" Language: FrameScript
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-19
let s:cpo_save = &cpo
set cpo&vim
diff --git a/runtime/ftplugin/gdb.vim b/runtime/ftplugin/gdb.vim
new file mode 100644
index 0000000000..2473b13af0
--- /dev/null
+++ b/runtime/ftplugin/gdb.vim
@@ -0,0 +1,12 @@
+" Vim filetype plugin file
+" Language: gdb
+" Maintainer: Michaël Peeters <NOSPAMm.vim@noekeon.org>
+" Last Changed: 26 Oct 2017
+
+if exists("b:did_ftplugin") | finish | endif
+let b:did_ftplugin = 1
+
+setlocal commentstring=#%s
+
+" Undo the stuff we changed.
+let b:undo_ftplugin = "setlocal cms<"
diff --git a/runtime/ftplugin/gpg.vim b/runtime/ftplugin/gpg.vim
index 5caa1f69c1..3f890e58f6 100644
--- a/runtime/ftplugin/gpg.vim
+++ b/runtime/ftplugin/gpg.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: gpg(1) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: gpg(1) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/group.vim b/runtime/ftplugin/group.vim
index eef3cd68d9..e6b76ba607 100644
--- a/runtime/ftplugin/group.vim
+++ b/runtime/ftplugin/group.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: group(5) user group file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: group(5) user group file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/grub.vim b/runtime/ftplugin/grub.vim
index 21c4e3609d..cd6e1139e5 100644
--- a/runtime/ftplugin/grub.vim
+++ b/runtime/ftplugin/grub.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: grub(8) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: grub(8) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/hamster.vim b/runtime/ftplugin/hamster.vim
index c23adc4232..6c0630fe04 100644
--- a/runtime/ftplugin/hamster.vim
+++ b/runtime/ftplugin/hamster.vim
@@ -1,8 +1,8 @@
" Vim filetype plugin
" Language: Hamster Script
" Version: 2.0.6.0
-" Maintainer: David Fishburn <fishburn@ianywhere.com>
-" Last Change: Wed Nov 08 2006 12:03:09 PM
+" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
+" Last Change: 2017 Mar 18
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -13,7 +13,7 @@ endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
-set cpo-=C
+set cpo&vim
let b:undo_ftplugin = "setl fo< com< tw< commentstring<"
\ . "| unlet! b:match_ignorecase b:match_words b:match_skip"
diff --git a/runtime/ftplugin/haskell.vim b/runtime/ftplugin/haskell.vim
index 144f9f6860..de77bdfb8a 100644
--- a/runtime/ftplugin/haskell.vim
+++ b/runtime/ftplugin/haskell.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: Haskell
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: Haskell
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/help.vim b/runtime/ftplugin/help.vim
index c94b2ef3eb..0f448bd306 100644
--- a/runtime/ftplugin/help.vim
+++ b/runtime/ftplugin/help.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: Vim help file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: Vim help file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
@@ -11,13 +11,16 @@ let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
-let b:undo_ftplugin = "setl fo< tw< cole< cocu<"
+let b:undo_ftplugin = "setl fo< tw< cole< cocu< keywordprg<"
setlocal formatoptions+=tcroql textwidth=78
if has("conceal")
setlocal cole=2 cocu=nc
endif
+" Prefer Vim help instead of manpages.
+setlocal keywordprg=:help
+
if !exists('g:no_plugin_maps')
function! s:show_toc() abort
let bufname = bufname('%')
@@ -87,7 +90,7 @@ if !exists('g:no_plugin_maps')
let w:qf_toc = bufname
endfunction
- nnoremap <silent><buffer> <M-]> :call <sid>show_toc()<cr>
+ nnoremap <silent><buffer> gO :call <sid>show_toc()<cr>
endif
let &cpo = s:cpo_save
diff --git a/runtime/ftplugin/hostconf.vim b/runtime/ftplugin/hostconf.vim
index 557fd82c53..563bb8f5f1 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-12-04
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2007-12-04
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/hostsaccess.vim b/runtime/ftplugin/hostsaccess.vim
index a2f55acb8a..d32485f162 100644
--- a/runtime/ftplugin/hostsaccess.vim
+++ b/runtime/ftplugin/hostsaccess.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: hosts_access(5) control file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: hosts_access(5) control file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/indent.vim b/runtime/ftplugin/indent.vim
index 0e195b0615..e6d928a073 100644
--- a/runtime/ftplugin/indent.vim
+++ b/runtime/ftplugin/indent.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: indent(1) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: indent(1) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/ld.vim b/runtime/ftplugin/ld.vim
index 31ce5c9ffd..1ab80d533c 100644
--- a/runtime/ftplugin/ld.vim
+++ b/runtime/ftplugin/ld.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: ld(1) script
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: ld(1) script
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/lftp.vim b/runtime/ftplugin/lftp.vim
index 9e2eeb52cb..5bc496c884 100644
--- a/runtime/ftplugin/lftp.vim
+++ b/runtime/ftplugin/lftp.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: lftp(1) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: lftp(1) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/libao.vim b/runtime/ftplugin/libao.vim
index 38bd3de92c..0ce5831b28 100644
--- a/runtime/ftplugin/libao.vim
+++ b/runtime/ftplugin/libao.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: libao.conf(5) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: libao.conf(5) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/limits.vim b/runtime/ftplugin/limits.vim
index cd5b7b5c93..90a10a6c22 100644
--- a/runtime/ftplugin/limits.vim
+++ b/runtime/ftplugin/limits.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: limits(5) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: limits(5) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/loginaccess.vim b/runtime/ftplugin/loginaccess.vim
index 7c44f972f2..d27114a7ae 100644
--- a/runtime/ftplugin/loginaccess.vim
+++ b/runtime/ftplugin/loginaccess.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: login.access(5) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: login.access(5) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/logindefs.vim b/runtime/ftplugin/logindefs.vim
index 668d08a002..7873396808 100644
--- a/runtime/ftplugin/logindefs.vim
+++ b/runtime/ftplugin/logindefs.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: login.defs(5) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: login.defs(5) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/m4.vim b/runtime/ftplugin/m4.vim
index 0ffe0ac77e..3745507321 100644
--- a/runtime/ftplugin/m4.vim
+++ b/runtime/ftplugin/m4.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: m4
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: m4
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/mailaliases.vim b/runtime/ftplugin/mailaliases.vim
index 1b10c86ae3..0ae4b452d0 100644
--- a/runtime/ftplugin/mailaliases.vim
+++ b/runtime/ftplugin/mailaliases.vim
@@ -1,6 +1,6 @@
" Vim filetype plugin file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/mailcap.vim b/runtime/ftplugin/mailcap.vim
index f4c8c232d8..ba8573c722 100644
--- a/runtime/ftplugin/mailcap.vim
+++ b/runtime/ftplugin/mailcap.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: Mailcap configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: Mailcap configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim
index 27c8b88e44..68ebb33e45 100644
--- a/runtime/ftplugin/man.vim
+++ b/runtime/ftplugin/man.vim
@@ -6,7 +6,7 @@ if exists('b:did_ftplugin') || &filetype !=# 'man'
endif
let b:did_ftplugin = 1
-let s:pager = !exists('b:man_sect')
+let s:pager = get(s:, 'pager', 0) || !exists('b:man_sect')
if s:pager
call man#init_pager()
@@ -31,11 +31,11 @@ setlocal nolist
setlocal nofoldenable
if !exists('g:no_plugin_maps') && !exists('g:no_man_maps')
- nnoremap <silent> <buffer> <M-]> :call man#show_toc()<CR>
+ nnoremap <silent> <buffer> gO :call man#show_toc()<CR>
nnoremap <silent> <buffer> <C-]> :Man<CR>
nnoremap <silent> <buffer> K :Man<CR>
nnoremap <silent> <buffer> <C-T> :call man#pop_tag()<CR>
- if s:pager
+ if 1 == bufnr('%') || s:pager
nnoremap <silent> <buffer> <nowait> q :lclose<CR>:q<CR>
else
nnoremap <silent> <buffer> <nowait> q :lclose<CR><C-W>c
diff --git a/runtime/ftplugin/manconf.vim b/runtime/ftplugin/manconf.vim
index a249a97507..aa85408cef 100644
--- a/runtime/ftplugin/manconf.vim
+++ b/runtime/ftplugin/manconf.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: man.conf(5) - man configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: man.conf(5) - man configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/modconf.vim b/runtime/ftplugin/modconf.vim
index f200e9f61e..c8e76b538b 100644
--- a/runtime/ftplugin/modconf.vim
+++ b/runtime/ftplugin/modconf.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: modules.conf(5) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: modules.conf(5) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/mplayerconf.vim b/runtime/ftplugin/mplayerconf.vim
index 65034a8152..86547609c3 100644
--- a/runtime/ftplugin/mplayerconf.vim
+++ b/runtime/ftplugin/mplayerconf.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: mplayer(1) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: mplayer(1) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/muttrc.vim b/runtime/ftplugin/muttrc.vim
index a109e5ddda..c8ad0f2ec5 100644
--- a/runtime/ftplugin/muttrc.vim
+++ b/runtime/ftplugin/muttrc.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: mutt RC File
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Language: mutt RC File
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2006-04-19
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/nanorc.vim b/runtime/ftplugin/nanorc.vim
index be20d12503..e45ebac0eb 100644
--- a/runtime/ftplugin/nanorc.vim
+++ b/runtime/ftplugin/nanorc.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: nanorc(5) - GNU nano configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: nanorc(5) - GNU nano configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/neomuttrc.vim b/runtime/ftplugin/neomuttrc.vim
new file mode 100644
index 0000000000..86f1cded63
--- /dev/null
+++ b/runtime/ftplugin/neomuttrc.vim
@@ -0,0 +1,23 @@
+" Vim filetype plugin file
+" Language: NeoMutt RC File
+" Previous Maintainer: Guillaume Brogi <gui-gui@netcourrier.com>
+" Latest Revision: 2017-09-17
+" Original version copied from ftplugin/muttrc.vim
+
+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
+setlocal formatoptions-=t formatoptions+=croql
+
+let &l:include = '^\s*source\>'
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/netrc.vim b/runtime/ftplugin/netrc.vim
index 105a1d3a8e..02ee327295 100644
--- a/runtime/ftplugin/netrc.vim
+++ b/runtime/ftplugin/netrc.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: netrc(5) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: netrc(5) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/nsis.vim b/runtime/ftplugin/nsis.vim
index acc26208c4..949691bf6e 100644
--- a/runtime/ftplugin/nsis.vim
+++ b/runtime/ftplugin/nsis.vim
@@ -1,7 +1,7 @@
" Vim ftplugin file
-" Language: NSIS script
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: NSIS script
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
let s:cpo_save = &cpo
set cpo&vim
diff --git a/runtime/ftplugin/pamconf.vim b/runtime/ftplugin/pamconf.vim
index 96d96461e2..f0a693e3a5 100644
--- a/runtime/ftplugin/pamconf.vim
+++ b/runtime/ftplugin/pamconf.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: pam(8) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: pam(8) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/passwd.vim b/runtime/ftplugin/passwd.vim
index 5088c43359..f6e0f50342 100644
--- a/runtime/ftplugin/passwd.vim
+++ b/runtime/ftplugin/passwd.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: passwd(5) password file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: passwd(5) password file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/perl.vim b/runtime/ftplugin/perl.vim
index 741cfae047..e7acf654f3 100644
--- a/runtime/ftplugin/perl.vim
+++ b/runtime/ftplugin/perl.vim
@@ -3,7 +3,7 @@
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Homepage: http://github.com/vim-perl/vim-perl
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues
-" Last Change: 2013-07-21
+" Last Change: 2015-02-09
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
@@ -33,14 +33,14 @@ endif
setlocal include=\\<\\(use\\\|require\\)\\>
setlocal includeexpr=substitute(substitute(substitute(v:fname,'::','/','g'),'->\*','',''),'$','.pm','')
setlocal define=[^A-Za-z_]
+setlocal iskeyword+=:
" The following line changes a global variable but is necessary to make
-" gf and similar commands work. The change to iskeyword was incorrect.
-" Thanks to Andrew Pimlott for pointing out the problem. If this causes a
-" problem for you, add an after/ftplugin/perl.vim file that contains
+" gf and similar commands work. Thanks to Andrew Pimlott for pointing
+" out the problem. If this causes a problem for you, add an
+" after/ftplugin/perl.vim file that contains
" set isfname-=:
set isfname+=:
-set iskeyword+=:
" Set this once, globally.
if !exists("perlpath")
@@ -77,11 +77,12 @@ endif
"---------------------------------------------
" Undo the stuff we changed.
-let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< kp< path<" .
+let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isk< isf< kp< path<" .
\ " | unlet! b:browsefilter"
" proper matching for matchit plugin
let b:match_skip = 's:comment\|string\|perlQQ\|perlShellCommand\|perlHereDoc\|perlSubstitution\|perlTranslation\|perlMatch\|perlFormatField'
+let b:match_words = '\<if\>:\<elsif\>:\<else\>'
" Restore the saved compatibility options.
let &cpo = s:save_cpo
diff --git a/runtime/ftplugin/pinfo.vim b/runtime/ftplugin/pinfo.vim
index 6ec1f87b9e..50473a8114 100644
--- a/runtime/ftplugin/pinfo.vim
+++ b/runtime/ftplugin/pinfo.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: pinfo(1) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: pinfo(1) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/procmail.vim b/runtime/ftplugin/procmail.vim
index cc2ceede19..d64f19274d 100644
--- a/runtime/ftplugin/procmail.vim
+++ b/runtime/ftplugin/procmail.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: procmail(1) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: procmail(1) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/prolog.vim b/runtime/ftplugin/prolog.vim
index caeb574c5a..f4e7d135b5 100644
--- a/runtime/ftplugin/prolog.vim
+++ b/runtime/ftplugin/prolog.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: Prolog
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: Prolog
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/protocols.vim b/runtime/ftplugin/protocols.vim
index 2486ff9370..83856ce7ba 100644
--- a/runtime/ftplugin/protocols.vim
+++ b/runtime/ftplugin/protocols.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: protocols(5) - Internet protocols definition file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: protocols(5) - Internet protocols definition file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/python.vim b/runtime/ftplugin/python.vim
index 546e3bd560..d52a338b5b 100644
--- a/runtime/ftplugin/python.vim
+++ b/runtime/ftplugin/python.vim
@@ -1,9 +1,10 @@
" Vim filetype plugin file
" Language: python
-" Maintainer: James Sully <sullyj3@gmail.com>
+" Maintainer: Tom Picton <tom@tompicton.co.uk>
+" Previous Maintainer: James Sully <sullyj3@gmail.com>
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
-" Last Change: Tue, 09 October 2016
-" https://github.com/sullyj3/vim-ftplugin-python
+" Last Change: Fri, 20 October 2017
+" https://github.com/tpict/vim-ftplugin-python
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
@@ -24,31 +25,51 @@ set wildignore+=*.pyc
let b:next_toplevel='\v%$\|^(class\|def\|async def)>'
let b:prev_toplevel='\v^(class\|def\|async def)>'
+let b:next_endtoplevel='\v%$\|\S.*\n+(def\|class)'
+let b:prev_endtoplevel='\v\S.*\n+(def\|class)'
let b:next='\v%$\|^\s*(class\|def\|async def)>'
let b:prev='\v^\s*(class\|def\|async def)>'
+let b:next_end='\v\S\n*(%$\|^\s*(class\|def\|async def)\|^\S)'
+let b:prev_end='\v\S\n*(^\s*(class\|def\|async def)\|^\S)'
execute "nnoremap <silent> <buffer> ]] :call <SID>Python_jump('n', '". b:next_toplevel."', 'W')<cr>"
execute "nnoremap <silent> <buffer> [[ :call <SID>Python_jump('n', '". b:prev_toplevel."', 'Wb')<cr>"
+execute "nnoremap <silent> <buffer> ][ :call <SID>Python_jump('n', '". b:next_endtoplevel."', 'W', 0)<cr>"
+execute "nnoremap <silent> <buffer> [] :call <SID>Python_jump('n', '". b:prev_endtoplevel."', 'Wb', 0)<cr>"
execute "nnoremap <silent> <buffer> ]m :call <SID>Python_jump('n', '". b:next."', 'W')<cr>"
execute "nnoremap <silent> <buffer> [m :call <SID>Python_jump('n', '". b:prev."', 'Wb')<cr>"
+execute "nnoremap <silent> <buffer> ]M :call <SID>Python_jump('n', '". b:next_end."', 'W', 0)<cr>"
+execute "nnoremap <silent> <buffer> [M :call <SID>Python_jump('n', '". b:prev_end."', 'Wb', 0)<cr>"
execute "onoremap <silent> <buffer> ]] :call <SID>Python_jump('o', '". b:next_toplevel."', 'W')<cr>"
execute "onoremap <silent> <buffer> [[ :call <SID>Python_jump('o', '". b:prev_toplevel."', 'Wb')<cr>"
+execute "onoremap <silent> <buffer> ][ :call <SID>Python_jump('n', '". b:next_endtoplevel."', 'W', 0)<cr>"
+execute "onoremap <silent> <buffer> [] :call <SID>Python_jump('n', '". b:prev_endtoplevel."', 'Wb', 0)<cr>"
execute "onoremap <silent> <buffer> ]m :call <SID>Python_jump('o', '". b:next."', 'W')<cr>"
execute "onoremap <silent> <buffer> [m :call <SID>Python_jump('o', '". b:prev."', 'Wb')<cr>"
+execute "onoremap <silent> <buffer> ]M :call <SID>Python_jump('o', '". b:next_end."', 'W', 0)<cr>"
+execute "onoremap <silent> <buffer> [M :call <SID>Python_jump('o', '". b:prev_end."', 'Wb', 0)<cr>"
execute "xnoremap <silent> <buffer> ]] :call <SID>Python_jump('x', '". b:next_toplevel."', 'W')<cr>"
execute "xnoremap <silent> <buffer> [[ :call <SID>Python_jump('x', '". b:prev_toplevel."', 'Wb')<cr>"
+execute "xnoremap <silent> <buffer> ][ :call <SID>Python_jump('n', '". b:next_endtoplevel."', 'W', 0)<cr>"
+execute "xnoremap <silent> <buffer> [] :call <SID>Python_jump('n', '". b:prev_endtoplevel."', 'Wb', 0)<cr>"
execute "xnoremap <silent> <buffer> ]m :call <SID>Python_jump('x', '". b:next."', 'W')<cr>"
execute "xnoremap <silent> <buffer> [m :call <SID>Python_jump('x', '". b:prev."', 'Wb')<cr>"
+execute "xnoremap <silent> <buffer> ]M :call <SID>Python_jump('x', '". b:next_end."', 'W', 0)<cr>"
+execute "xnoremap <silent> <buffer> [M :call <SID>Python_jump('x', '". b:prev_end."', 'Wb', 0)<cr>"
if !exists('*<SID>Python_jump')
- fun! <SID>Python_jump(mode, motion, flags) range
+ fun! <SID>Python_jump(mode, motion, flags, ...) range
+ let l:startofline = (a:0 >= 1) ? a:1 : 1
+
if a:mode == 'x'
normal! gv
endif
- normal! 0
+ if l:startofline == 1
+ normal! 0
+ endif
let cnt = v:count1
mark '
@@ -57,7 +78,9 @@ if !exists('*<SID>Python_jump')
let cnt = cnt - 1
endwhile
- normal! ^
+ if l:startofline == 1
+ normal! ^
+ endif
endfun
endif
diff --git a/runtime/ftplugin/quake.vim b/runtime/ftplugin/quake.vim
index f62693b11a..c3a2e52347 100644
--- a/runtime/ftplugin/quake.vim
+++ b/runtime/ftplugin/quake.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: Quake[1-3] configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: Quake[1-3] configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/racc.vim b/runtime/ftplugin/racc.vim
index 7ff22f8937..0cd852c365 100644
--- a/runtime/ftplugin/racc.vim
+++ b/runtime/ftplugin/racc.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: Racc input file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: Racc input file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/readline.vim b/runtime/ftplugin/readline.vim
index 0a4dbb5c03..e9ef93ec7f 100644
--- a/runtime/ftplugin/readline.vim
+++ b/runtime/ftplugin/readline.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: readline(3) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: readline(3) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/rnc.vim b/runtime/ftplugin/rnc.vim
index 2b8fd50d8d..90aa111c67 100644
--- a/runtime/ftplugin/rnc.vim
+++ b/runtime/ftplugin/rnc.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: Relax NG compact syntax
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: Relax NG compact syntax
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/rst.vim b/runtime/ftplugin/rst.vim
index b871cf1486..e61213e7a5 100644
--- a/runtime/ftplugin/rst.vim
+++ b/runtime/ftplugin/rst.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: reStructuredText documentation format
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: reStructuredText documentation format
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/rust.vim b/runtime/ftplugin/rust.vim
new file mode 100644
index 0000000000..7efca5985b
--- /dev/null
+++ b/runtime/ftplugin/rust.vim
@@ -0,0 +1,197 @@
+" Language: Rust
+" Description: Vim ftplugin for Rust
+" Maintainer: Chris Morgan <me@chrismorgan.info>
+" Maintainer: Kevin Ballard <kevin@sb.org>
+" Last Change: June 08, 2016
+" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
+
+if exists("b:did_ftplugin")
+ finish
+endif
+let b:did_ftplugin = 1
+
+let s:save_cpo = &cpo
+set cpo&vim
+
+augroup rust.vim
+autocmd!
+
+" Variables {{{1
+
+" The rust source code at present seems to typically omit a leader on /*!
+" comments, so we'll use that as our default, but make it easy to switch.
+" This does not affect indentation at all (I tested it with and without
+" leader), merely whether a leader is inserted by default or not.
+if exists("g:rust_bang_comment_leader") && g:rust_bang_comment_leader != 0
+ " Why is the `,s0:/*,mb:\ ,ex:*/` there, you ask? I don't understand why,
+ " but without it, */ gets indented one space even if there were no
+ " leaders. I'm fairly sure that's a Vim bug.
+ setlocal comments=s1:/*,mb:*,ex:*/,s0:/*,mb:\ ,ex:*/,:///,://!,://
+else
+ setlocal comments=s0:/*!,m:\ ,ex:*/,s1:/*,mb:*,ex:*/,:///,://!,://
+endif
+setlocal commentstring=//%s
+setlocal formatoptions-=t formatoptions+=croqnl
+" j was only added in 7.3.541, so stop complaints about its nonexistence
+silent! setlocal formatoptions+=j
+
+" smartindent will be overridden by indentexpr if filetype indent is on, but
+" otherwise it's better than nothing.
+setlocal smartindent nocindent
+
+if !exists("g:rust_recommended_style") || g:rust_recommended_style != 0
+ setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab
+ setlocal textwidth=99
+endif
+
+" This includeexpr isn't perfect, but it's a good start
+setlocal includeexpr=substitute(v:fname,'::','/','g')
+
+setlocal suffixesadd=.rs
+
+if exists("g:ftplugin_rust_source_path")
+ let &l:path=g:ftplugin_rust_source_path . ',' . &l:path
+endif
+
+if exists("g:loaded_delimitMate")
+ if exists("b:delimitMate_excluded_regions")
+ let b:rust_original_delimitMate_excluded_regions = b:delimitMate_excluded_regions
+ endif
+
+ let s:delimitMate_extra_excluded_regions = ',rustLifetimeCandidate,rustGenericLifetimeCandidate'
+
+ " For this buffer, when delimitMate issues the `User delimitMate_map`
+ " event in the autocommand system, add the above-defined extra excluded
+ " regions to delimitMate's state, if they have not already been added.
+ autocmd User <buffer>
+ \ if expand('<afile>') ==# 'delimitMate_map' && match(
+ \ delimitMate#Get("excluded_regions"),
+ \ s:delimitMate_extra_excluded_regions) == -1
+ \| let b:delimitMate_excluded_regions =
+ \ delimitMate#Get("excluded_regions")
+ \ . s:delimitMate_extra_excluded_regions
+ \|endif
+
+ " For this buffer, when delimitMate issues the `User delimitMate_unmap`
+ " event in the autocommand system, delete the above-defined extra excluded
+ " regions from delimitMate's state (the deletion being idempotent and
+ " having no effect if the extra excluded regions are not present in the
+ " targeted part of delimitMate's state).
+ autocmd User <buffer>
+ \ if expand('<afile>') ==# 'delimitMate_unmap'
+ \| let b:delimitMate_excluded_regions = substitute(
+ \ delimitMate#Get("excluded_regions"),
+ \ '\C\V' . s:delimitMate_extra_excluded_regions,
+ \ '', 'g')
+ \|endif
+endif
+
+if has("folding") && exists('g:rust_fold') && g:rust_fold != 0
+ let b:rust_set_foldmethod=1
+ setlocal foldmethod=syntax
+ if g:rust_fold == 2
+ setlocal foldlevel<
+ else
+ setlocal foldlevel=99
+ endif
+endif
+
+if has('conceal') && exists('g:rust_conceal') && g:rust_conceal != 0
+ let b:rust_set_conceallevel=1
+ setlocal conceallevel=2
+endif
+
+" Motion Commands {{{1
+
+" Bind motion commands to support hanging indents
+nnoremap <silent> <buffer> [[ :call rust#Jump('n', 'Back')<CR>
+nnoremap <silent> <buffer> ]] :call rust#Jump('n', 'Forward')<CR>
+xnoremap <silent> <buffer> [[ :call rust#Jump('v', 'Back')<CR>
+xnoremap <silent> <buffer> ]] :call rust#Jump('v', 'Forward')<CR>
+onoremap <silent> <buffer> [[ :call rust#Jump('o', 'Back')<CR>
+onoremap <silent> <buffer> ]] :call rust#Jump('o', 'Forward')<CR>
+
+" Commands {{{1
+
+" See |:RustRun| for docs
+command! -nargs=* -complete=file -bang -buffer RustRun call rust#Run(<bang>0, <q-args>)
+
+" See |:RustExpand| for docs
+command! -nargs=* -complete=customlist,rust#CompleteExpand -bang -buffer RustExpand call rust#Expand(<bang>0, <q-args>)
+
+" See |:RustEmitIr| for docs
+command! -nargs=* -buffer RustEmitIr call rust#Emit("llvm-ir", <q-args>)
+
+" See |:RustEmitAsm| for docs
+command! -nargs=* -buffer RustEmitAsm call rust#Emit("asm", <q-args>)
+
+" See |:RustPlay| for docs
+command! -range=% RustPlay :call rust#Play(<count>, <line1>, <line2>, <f-args>)
+
+" See |:RustFmt| for docs
+command! -buffer RustFmt call rustfmt#Format()
+
+" See |:RustFmtRange| for docs
+command! -range -buffer RustFmtRange call rustfmt#FormatRange(<line1>, <line2>)
+
+" Mappings {{{1
+
+" Bind ⌘R in MacVim to :RustRun
+nnoremap <silent> <buffer> <D-r> :RustRun<CR>
+" Bind ⌘⇧R in MacVim to :RustRun! pre-filled with the last args
+nnoremap <buffer> <D-R> :RustRun! <C-r>=join(b:rust_last_rustc_args)<CR><C-\>erust#AppendCmdLine(' -- ' . join(b:rust_last_args))<CR>
+
+if !exists("b:rust_last_rustc_args") || !exists("b:rust_last_args")
+ let b:rust_last_rustc_args = []
+ let b:rust_last_args = []
+endif
+
+" Cleanup {{{1
+
+let b:undo_ftplugin = "
+ \ setlocal formatoptions< comments< commentstring< includeexpr< suffixesadd<
+ \|setlocal tabstop< shiftwidth< softtabstop< expandtab< textwidth<
+ \|if exists('b:rust_original_delimitMate_excluded_regions')
+ \|let b:delimitMate_excluded_regions = b:rust_original_delimitMate_excluded_regions
+ \|unlet b:rust_original_delimitMate_excluded_regions
+ \|else
+ \|unlet! b:delimitMate_excluded_regions
+ \|endif
+ \|if exists('b:rust_set_foldmethod')
+ \|setlocal foldmethod< foldlevel<
+ \|unlet b:rust_set_foldmethod
+ \|endif
+ \|if exists('b:rust_set_conceallevel')
+ \|setlocal conceallevel<
+ \|unlet b:rust_set_conceallevel
+ \|endif
+ \|unlet! b:rust_last_rustc_args b:rust_last_args
+ \|delcommand RustRun
+ \|delcommand RustExpand
+ \|delcommand RustEmitIr
+ \|delcommand RustEmitAsm
+ \|delcommand RustPlay
+ \|nunmap <buffer> <D-r>
+ \|nunmap <buffer> <D-R>
+ \|nunmap <buffer> [[
+ \|nunmap <buffer> ]]
+ \|xunmap <buffer> [[
+ \|xunmap <buffer> ]]
+ \|ounmap <buffer> [[
+ \|ounmap <buffer> ]]
+ \|set matchpairs-=<:>
+ \"
+
+" }}}1
+
+" Code formatting on save
+if get(g:, "rustfmt_autosave", 0)
+ autocmd BufWritePre *.rs silent! call rustfmt#Format()
+endif
+
+augroup END
+
+let &cpo = s:save_cpo
+unlet s:save_cpo
+
+" vim: set noet sw=8 ts=8:
diff --git a/runtime/ftplugin/sbt.vim b/runtime/ftplugin/sbt.vim
new file mode 100644
index 0000000000..309d30e503
--- /dev/null
+++ b/runtime/ftplugin/sbt.vim
@@ -0,0 +1,15 @@
+" Vim filetype plugin file
+" Language: sbt
+" Maintainer: Steven Dobay <stevendobay at protonmail.com>
+" License: Same as Vim
+" Last Change: 2017.04.30
+" ----------------------------------------------------------------------------
+
+if exists('b:did_ftplugin') || &cp
+ finish
+endif
+
+let b:did_ftplugin = 1
+
+runtime! ftplugin/scala.vim
+
diff --git a/runtime/ftplugin/screen.vim b/runtime/ftplugin/screen.vim
index 95c3849556..c22089be2c 100644
--- a/runtime/ftplugin/screen.vim
+++ b/runtime/ftplugin/screen.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: screen(1) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: screen(1) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/sensors.vim b/runtime/ftplugin/sensors.vim
index 813d14c0e1..c02a729405 100644
--- a/runtime/ftplugin/sensors.vim
+++ b/runtime/ftplugin/sensors.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: sensors.conf(5) - libsensors configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: sensors.conf(5) - libsensors configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/services.vim b/runtime/ftplugin/services.vim
index d34349ee28..dda08ac20a 100644
--- a/runtime/ftplugin/services.vim
+++ b/runtime/ftplugin/services.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: services(5) - Internet network services list
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: services(5) - Internet network services list
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/setserial.vim b/runtime/ftplugin/setserial.vim
index f9d5945787..e5823f4432 100644
--- a/runtime/ftplugin/setserial.vim
+++ b/runtime/ftplugin/setserial.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: setserial(8) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: setserial(8) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/sieve.vim b/runtime/ftplugin/sieve.vim
index 9a8759c024..3092b5d2d3 100644
--- a/runtime/ftplugin/sieve.vim
+++ b/runtime/ftplugin/sieve.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: Sieve filtering language input file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: Sieve filtering language input file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/slpconf.vim b/runtime/ftplugin/slpconf.vim
index 0c45689672..a975a499e5 100644
--- a/runtime/ftplugin/slpconf.vim
+++ b/runtime/ftplugin/slpconf.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: RFC 2614 - An API for Service Location configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: RFC 2614 - An API for Service Location configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/slpreg.vim b/runtime/ftplugin/slpreg.vim
index e9d533e2d4..74c7285b66 100644
--- a/runtime/ftplugin/slpreg.vim
+++ b/runtime/ftplugin/slpreg.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: RFC 2614 - An API for Service Location registration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: RFC 2614 - An API for Service Location registration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/slpspi.vim b/runtime/ftplugin/slpspi.vim
index 8d64d476f1..633555e493 100644
--- a/runtime/ftplugin/slpspi.vim
+++ b/runtime/ftplugin/slpspi.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: RFC 2614 - An API for Service Location SPI file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: RFC 2614 - An API for Service Location SPI file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/sql.vim b/runtime/ftplugin/sql.vim
index c2bc857947..4d6fcd9564 100644
--- a/runtime/ftplugin/sql.vim
+++ b/runtime/ftplugin/sql.vim
@@ -1,8 +1,8 @@
" SQL filetype plugin file
" Language: SQL (Common for Oracle, Microsoft SQL Server, Sybase)
-" Version: 11.0
+" Version: 12.0
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
-" Last Change: 2013 May 13
+" Last Change: 2017 Mar 07
" Download: http://vim.sourceforge.net/script.php?script_id=454
" For more details please use:
@@ -36,6 +36,14 @@
"
" History
"
+" Version 12.0 (April 2013)
+"
+" NF: Added support for "BEGIN TRY ... END TRY ... BEGIN CATCH ... END CATCH
+" BF: This plugin is designed to be used with other plugins to enable the
+" SQL completion with Perl, Python, Java, ... The loading mechanism
+" was not checking if the SQL objects were created, which can lead to
+" the plugin not loading the SQL support.
+"
" Version 11.0 (May 2013)
"
" NF: Updated to use SyntaxComplete's new regex support for syntax groups.
@@ -80,15 +88,17 @@
" Only do this when not done yet for this buffer
-if exists("b:did_ftplugin")
- finish
+" This ftplugin can be used with other ftplugins. So ensure loading
+" happens if all elements of this plugin have not yet loaded.
+if exists("b:did_ftplugin") && exists("b:current_ftplugin") && b:current_ftplugin == 'sql'
+ finish
endif
let s:save_cpo = &cpo
set cpo&vim
" Disable autowrapping for code, but enable for comments
-" t Auto-wrap text using textwidth
+" t Auto-wrap text using textwidth
" c Auto-wrap comments using textwidth, inserting the current comment
" leader automatically.
setlocal formatoptions-=t
@@ -171,6 +181,9 @@ if !exists("*SQL_SetType")
if exists("b:current_syntax")
" echomsg 'SQLSetType - clearing syntax'
syntax clear
+ if exists("b:current_syntax")
+ unlet b:current_syntax
+ endif
endif
if exists("b:did_indent")
" echomsg 'SQLSetType - clearing indent'
@@ -187,7 +200,7 @@ if !exists("*SQL_SetType")
" Do not specify a buffer local variable if it is
" the default value
if new_sql_type == 'sql'
- let new_sql_type = 'sqloracle'
+ let new_sql_type = 'sqloracle'
endif
let b:sql_type_override = new_sql_type
@@ -234,25 +247,26 @@ if exists("b:sql_type_override")
" echo 'sourcing buffer ftplugin/'.b:sql_type_override.'.vim'
if globpath(&runtimepath, 'ftplugin/'.b:sql_type_override.'.vim') != ''
exec 'runtime ftplugin/'.b:sql_type_override.'.vim'
- " else
- " echomsg 'ftplugin/'.b:sql_type_override.' not exist, using default'
+ " else
+ " echomsg 'ftplugin/'.b:sql_type_override.' not exist, using default'
endif
elseif exists("g:sql_type_default")
" echo 'sourcing global ftplugin/'.g:sql_type_default.'.vim'
if globpath(&runtimepath, 'ftplugin/'.g:sql_type_default.'.vim') != ''
exec 'runtime ftplugin/'.g:sql_type_default.'.vim'
- " else
- " echomsg 'ftplugin/'.g:sql_type_default.'.vim not exist, using default'
+ " else
+ " echomsg 'ftplugin/'.g:sql_type_default.'.vim not exist, using default'
endif
endif
" If the above runtime command succeeded, do not load the default settings
-if exists("b:did_ftplugin")
- finish
+" as they should have already been loaded from a previous run.
+if exists("b:did_ftplugin") && exists("b:current_ftplugin") && b:current_ftplugin == 'sql'
+ finish
endif
let b:undo_ftplugin = "setl comments< formatoptions< define< omnifunc<" .
- \ " | unlet! b:browsefilter b:match_words"
+ \ " | unlet! b:browsefilter b:match_words"
" Don't load another plugin for this buffer
let b:did_ftplugin = 1
@@ -261,7 +275,7 @@ let b:current_ftplugin = 'sql'
" Win32 can filter files in the browse dialog
if has("gui_win32") && !exists("b:browsefilter")
let b:browsefilter = "SQL Files (*.sql)\t*.sql\n" .
- \ "All Files (*.*)\t*.*\n"
+ \ "All Files (*.*)\t*.*\n"
endif
" Some standard expressions for use with the matchit strings
@@ -312,14 +326,24 @@ if !exists("b:match_words")
" WHEN column_not_found THEN
" WHEN OTHERS THEN
"
+ " begin try
+ " end try
+ " begin catch
+ " end catch
+ "
" create[ or replace] procedure|function|event
- " \ '^\s*\<\%(do\|for\|while\|loop\)\>.*:'.
+ " \ '^\s*\<\%(do\|for\|while\|loop\)\>.*:'.
" For ColdFusion support
setlocal matchpairs+=<:>
let b:match_words = &matchpairs .
- \ ',\<begin\>:\<end\>\W*$,'.
- \
+ \ ',\%(\<begin\)\%(\s\+\%(try\|catch\)\>\)\@!:\<end\>\W*$,'.
+ \
+ \ '\<begin\s\+try\>:'.
+ \ '\<end\s\+try\>:'.
+ \ '\<begin\s\+catch\>:'.
+ \ '\<end\s\+catch\>,'.
+ \
\ s:notend . '\<if\>:'.
\ '\<elsif\>\|\<elseif\>\|\<else\>:'.
\ '\<end\s\+if\>,'.
@@ -339,14 +363,14 @@ if !exists("b:match_words")
\ '\%(\<create\s\+' . s:or_replace . '\)\?'.
\ '\%(function\|procedure\|event\):'.
\ '\<returns\?\>'
- " \ '\<begin\>\|\<returns\?\>:'.
- " \ '\<end\>\(;\)\?\s*$'
- " \ '\<exception\>:'.s:when_no_matched_or_others.
- " \ ':\<when\s\+others\>,'.
- "
- " \ '\%(\<exception\>\|\%('. s:notend . '\<case\>\)\):'.
- " \ '\%(\<default\>\|'.s:when_no_matched_or_others.'\):'.
- " \ '\%(\%(\<when\s\+others\>\)\|\<end\s\+case\>\),' .
+ " \ '\<begin\>\|\<returns\?\>:'.
+ " \ '\<end\>\(;\)\?\s*$'
+ " \ '\<exception\>:'.s:when_no_matched_or_others.
+ " \ ':\<when\s\+others\>,'.
+ "
+ " \ '\%(\<exception\>\|\%('. s:notend . '\<case\>\)\):'.
+ " \ '\%(\<default\>\|'.s:when_no_matched_or_others.'\):'.
+ " \ '\%(\%(\<when\s\+others\>\)\|\<end\s\+case\>\),' .
endif
" Define how to find the macro definition of a variable using the various
diff --git a/runtime/ftplugin/sshconfig.vim b/runtime/ftplugin/sshconfig.vim
index f940af972e..d933ce0527 100644
--- a/runtime/ftplugin/sshconfig.vim
+++ b/runtime/ftplugin/sshconfig.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: OpenSSH client configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: OpenSSH client configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/sudoers.vim b/runtime/ftplugin/sudoers.vim
index 5756302178..38dbf559ee 100644
--- a/runtime/ftplugin/sudoers.vim
+++ b/runtime/ftplugin/sudoers.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: sudoers(5) configuration files
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: sudoers(5) configuration files
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/sysctl.vim b/runtime/ftplugin/sysctl.vim
index fb1098dd3b..8d331cea38 100644
--- a/runtime/ftplugin/sysctl.vim
+++ b/runtime/ftplugin/sysctl.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: sysctl.conf(5) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: sysctl.conf(5) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/terminfo.vim b/runtime/ftplugin/terminfo.vim
index 7ce31d1ca1..0ffcc58f58 100644
--- a/runtime/ftplugin/terminfo.vim
+++ b/runtime/ftplugin/terminfo.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: terminfo(5) definition
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: terminfo(5) definition
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/tmux.vim b/runtime/ftplugin/tmux.vim
new file mode 100644
index 0000000000..ed9154924b
--- /dev/null
+++ b/runtime/ftplugin/tmux.vim
@@ -0,0 +1,12 @@
+" Vim filetype plugin file
+" Language: tmux(1) configuration file
+" URL: https://github.com/ericpruitt/tmux.vim/
+" Maintainer: Eric Pruitt <eric.pruitt@gmail.com>
+" Last Changed: 2017 Mar 10
+
+if exists("b:did_ftplugin")
+ finish
+endif
+let b:did_ftplugin = 1
+
+setlocal commentstring=#\ %s
diff --git a/runtime/ftplugin/treetop.vim b/runtime/ftplugin/treetop.vim
index 2da3c405f5..f978d15303 100644
--- a/runtime/ftplugin/treetop.vim
+++ b/runtime/ftplugin/treetop.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: Treetop
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2011-03-14
+" Language: Treetop
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2011-03-14
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/tutor.vim b/runtime/ftplugin/tutor.vim
index 1579753170..ec55472b78 100644
--- a/runtime/ftplugin/tutor.vim
+++ b/runtime/ftplugin/tutor.vim
@@ -19,27 +19,30 @@ setlocal noundofile
setlocal keywordprg=:help
setlocal iskeyword=@,-,_
-setlocal foldmethod=expr
+" The user will have to enable the folds himself, but we provide the foldexpr
+" function.
+setlocal foldmethod=manual
setlocal foldexpr=tutor#TutorFolds()
-setlocal foldcolumn=1
setlocal foldlevel=4
-setlocal nowrap
setlocal statusline=%{toupper(expand('%:t:r'))}\ tutorial%=
setlocal statusline+=%{tutor#InfoText()}
+" Load metadata if it exists: {{{1
+if filereadable(expand('%').'.json')
+ call tutor#LoadMetadata()
+endif
+
" Mappings: {{{1
call tutor#SetNormalMappings()
-call tutor#SetSampleTextMappings()
" Checks: {{{1
sign define tutorok text=✓ texthl=tutorOK
sign define tutorbad text=✗ texthl=tutorX
-if !exists('g:tutor_debug') || g:tutor_debug == 0
- call tutor#PlaceXMarks()
- autocmd! TextChanged <buffer> call tutor#OnTextChanged()
- autocmd! TextChangedI <buffer> call tutor#OnTextChanged()
+if !exists('g:tutor_debug') || g:tutor_debug == 0
+ call tutor#ApplyMarks()
+ autocmd! TextChanged,TextChangedI <buffer> call tutor#ApplyMarksOnChanged()
endif
diff --git a/runtime/ftplugin/udevconf.vim b/runtime/ftplugin/udevconf.vim
index 6042e14413..0bbd86a0a4 100644
--- a/runtime/ftplugin/udevconf.vim
+++ b/runtime/ftplugin/udevconf.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: udev(8) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: udev(8) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/udevperm.vim b/runtime/ftplugin/udevperm.vim
index e7ad31d071..f8fb4d4d99 100644
--- a/runtime/ftplugin/udevperm.vim
+++ b/runtime/ftplugin/udevperm.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: udev(8) permissions file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: udev(8) permissions file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/udevrules.vim b/runtime/ftplugin/udevrules.vim
index be8d646968..6404f6c85e 100644
--- a/runtime/ftplugin/udevrules.vim
+++ b/runtime/ftplugin/udevrules.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: udev(8) rules file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: udev(8) rules file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/updatedb.vim b/runtime/ftplugin/updatedb.vim
index f4e7bcebd5..3015918d70 100644
--- a/runtime/ftplugin/updatedb.vim
+++ b/runtime/ftplugin/updatedb.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: updatedb.conf(5) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: updatedb.conf(5) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/verilog.vim b/runtime/ftplugin/verilog.vim
index 6594f2ea90..cbf30a3185 100644
--- a/runtime/ftplugin/verilog.vim
+++ b/runtime/ftplugin/verilog.vim
@@ -1,8 +1,12 @@
" Vim filetype plugin file
" Language: Verilog HDL
-" Maintainer: Chih-Tsun Huang <cthuang@larc.ee.nthu.edu.tw>
-" Last Change: Wed Sep 3 15:24:49 CST 2008
-" URL: http://larc.ee.nthu.edu.tw/~cthuang/vim/ftplugin/verilog.vim
+" Maintainer: Chih-Tsun Huang <cthuang@cs.nthu.edu.tw>
+" Last Change: 2017 Aug 25 by Chih-Tsun Huang
+" URL: http://www.cs.nthu.edu.tw/~cthuang/vim/ftplugin/verilog.vim
+"
+" Credits:
+" Suggestions for improvement, bug reports by
+" Shao <shaominghai2005@163.com>
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -45,11 +49,16 @@ if exists("loaded_matchit")
\ '\<begin\>:\<end\>,' .
\ '\<case\>\|\<casex\>\|\<casez\>:\<endcase\>,' .
\ '\<module\>:\<endmodule\>,' .
- \ '\<if\>:\<else\>,' .
+ \ '\<if\>:`\@<!\<else\>,' .
\ '\<function\>:\<endfunction\>,' .
- \ '`ifdef\>:`else\>:`endif\>,' .
+ \ '`ifn\?def\>:`elsif\>:`else\>:`endif\>,' .
\ '\<task\>:\<endtask\>,' .
- \ '\<specify\>:\<endspecify\>'
+ \ '\<specify\>:\<endspecify\>,' .
+ \ '\<config\>:\<endconfig\>,' .
+ \ '\<generate\>:\<endgenerate\>,' .
+ \ '\<fork\>:\<join\>,' .
+ \ '\<primitive\>:\<endprimitive\>,' .
+ \ '\<table\>:\<endtable\>'
endif
" Reset 'cpoptions' back to the user's setting
diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim
index f355d2837d..ba9ed76169 100644
--- a/runtime/ftplugin/vim.vim
+++ b/runtime/ftplugin/vim.vim
@@ -14,7 +14,7 @@ let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo-=C
-let b:undo_ftplugin = "setl fo< isk< com< tw< commentstring<"
+let b:undo_ftplugin = "setl fo< isk< com< tw< commentstring< keywordprg<"
\ . "| unlet! b:match_ignorecase b:match_words b:match_skip"
" Set 'formatoptions' to break comment lines but not other lines,
@@ -36,6 +36,9 @@ endif
" Comments start with a double quote
setlocal commentstring=\"%s
+" Prefer Vim help instead of manpages.
+setlocal keywordprg=:help
+
" Move around functions.
nnoremap <silent><buffer> [[ m':call search('^\s*fu\%[nction]\>', "bW")<CR>
vnoremap <silent><buffer> [[ m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "bW")<CR>
diff --git a/runtime/ftplugin/xdefaults.vim b/runtime/ftplugin/xdefaults.vim
index cd851829ca..c1aff70176 100644
--- a/runtime/ftplugin/xdefaults.vim
+++ b/runtime/ftplugin/xdefaults.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: X resources files like ~/.Xdefaults (xrdb)
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: X resources files like ~/.Xdefaults (xrdb)
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/xf86conf.vim b/runtime/ftplugin/xf86conf.vim
index ab7569a100..5a21539dd5 100644
--- a/runtime/ftplugin/xf86conf.vim
+++ b/runtime/ftplugin/xf86conf.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: XFree86 Configuration File
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: XFree86 Configuration File
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/xinetd.vim b/runtime/ftplugin/xinetd.vim
index f209af18be..2b7b64e4fa 100644
--- a/runtime/ftplugin/xinetd.vim
+++ b/runtime/ftplugin/xinetd.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: xinetd.conf(5) configuration file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: xinetd.conf(5) configuration file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/xmodmap.vim b/runtime/ftplugin/xmodmap.vim
index 027ae09ff2..77fccd5b4d 100644
--- a/runtime/ftplugin/xmodmap.vim
+++ b/runtime/ftplugin/xmodmap.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: xmodmap(1) definition file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: xmodmap(1) definition file
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/yaml.vim b/runtime/ftplugin/yaml.vim
index b88803ab3a..ceff36f7e4 100644
--- a/runtime/ftplugin/yaml.vim
+++ b/runtime/ftplugin/yaml.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
-" Language: YAML (YAML Ain't Markup Language)
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Language: YAML (YAML Ain't Markup Language)
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish
diff --git a/runtime/ftplugin/zsh.vim b/runtime/ftplugin/zsh.vim
index 6cbc380dc3..c03a9466a1 100644
--- a/runtime/ftplugin/zsh.vim
+++ b/runtime/ftplugin/zsh.vim
@@ -1,10 +1,10 @@
" Vim filetype plugin file
-" Language: Zsh shell script
-" Maintainer: Christian Brabandt <cb@256bit.org>
-" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2015-05-29
-" License: Vim (see :h license)
-" Repository: https://github.com/chrisbra/vim-zsh
+" Language: Zsh shell script
+" Maintainer: Christian Brabandt <cb@256bit.org>
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2015-05-29
+" License: Vim (see :h license)
+" Repository: https://github.com/chrisbra/vim-zsh
if exists("b:did_ftplugin")
finish