summaryrefslogtreecommitdiffstats
path: root/runtime/ftplugin
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r--runtime/ftplugin/abaqus.vim3
-rw-r--r--runtime/ftplugin/arduino.vim67
-rw-r--r--runtime/ftplugin/asm.vim3
-rw-r--r--runtime/ftplugin/astro.vim7
-rw-r--r--runtime/ftplugin/bitbake.vim3
-rw-r--r--runtime/ftplugin/c.vim3
-rw-r--r--runtime/ftplugin/calendar.vim3
-rw-r--r--runtime/ftplugin/cgdbrc.vim3
-rw-r--r--runtime/ftplugin/cpp.vim6
-rw-r--r--runtime/ftplugin/csh.vim3
-rw-r--r--runtime/ftplugin/css.vim3
-rw-r--r--runtime/ftplugin/dart.vim15
-rw-r--r--runtime/ftplugin/deb822sources.vim4
-rw-r--r--runtime/ftplugin/debcontrol.vim7
-rw-r--r--runtime/ftplugin/debsources.vim4
-rw-r--r--runtime/ftplugin/desktop.vim3
-rw-r--r--runtime/ftplugin/dtd.vim3
-rw-r--r--runtime/ftplugin/dtrace.vim5
-rw-r--r--runtime/ftplugin/dts.vim3
-rw-r--r--runtime/ftplugin/erlang.vim5
-rw-r--r--runtime/ftplugin/eruby.vim3
-rw-r--r--runtime/ftplugin/fennel.vim3
-rw-r--r--runtime/ftplugin/fish.vim3
-rw-r--r--runtime/ftplugin/fortran.vim3
-rw-r--r--runtime/ftplugin/fstab.vim3
-rw-r--r--runtime/ftplugin/gdb.vim3
-rw-r--r--runtime/ftplugin/graphql.vim13
-rw-r--r--runtime/ftplugin/groovy.vim3
-rw-r--r--runtime/ftplugin/hamster.vim3
-rw-r--r--runtime/ftplugin/hare.vim56
-rw-r--r--runtime/ftplugin/haredoc.vim44
-rw-r--r--runtime/ftplugin/html.vim3
-rw-r--r--runtime/ftplugin/hyprlang.vim13
-rw-r--r--runtime/ftplugin/indent.vim3
-rw-r--r--runtime/ftplugin/initex.vim3
-rw-r--r--runtime/ftplugin/java.vim3
-rw-r--r--runtime/ftplugin/javascript.vim3
-rw-r--r--runtime/ftplugin/jj.vim19
-rw-r--r--runtime/ftplugin/jq.vim11
-rw-r--r--runtime/ftplugin/jsonc.vim3
-rw-r--r--runtime/ftplugin/kdl.vim17
-rw-r--r--runtime/ftplugin/lc.vim13
-rw-r--r--runtime/ftplugin/ld.vim5
-rw-r--r--runtime/ftplugin/liquid.vim3
-rw-r--r--runtime/ftplugin/lisp.vim3
-rw-r--r--runtime/ftplugin/man.vim8
-rw-r--r--runtime/ftplugin/markdown.vim3
-rw-r--r--runtime/ftplugin/mma.vim5
-rw-r--r--runtime/ftplugin/modula2.vim3
-rw-r--r--runtime/ftplugin/modula3.vim3
-rw-r--r--runtime/ftplugin/nim.vim13
-rw-r--r--runtime/ftplugin/nroff.vim6
-rw-r--r--runtime/ftplugin/obse.vim7
-rw-r--r--runtime/ftplugin/ocaml.vim4
-rw-r--r--runtime/ftplugin/odin.vim11
-rw-r--r--runtime/ftplugin/openvpn.vim3
-rw-r--r--runtime/ftplugin/pascal.vim3
-rw-r--r--runtime/ftplugin/pdf.vim3
-rw-r--r--runtime/ftplugin/perl.vim3
-rw-r--r--runtime/ftplugin/php.vim3
-rw-r--r--runtime/ftplugin/prisma.vim13
-rw-r--r--runtime/ftplugin/ps1.vim3
-rw-r--r--runtime/ftplugin/ps1xml.vim3
-rw-r--r--runtime/ftplugin/purescript.vim14
-rw-r--r--runtime/ftplugin/python.vim23
-rw-r--r--runtime/ftplugin/qml.vim3
-rw-r--r--runtime/ftplugin/racket.vim5
-rw-r--r--runtime/ftplugin/raku.vim13
-rw-r--r--runtime/ftplugin/rasi.vim25
-rw-r--r--runtime/ftplugin/rescript.vim13
-rw-r--r--runtime/ftplugin/rust.vim11
-rw-r--r--runtime/ftplugin/scdoc.vim9
-rw-r--r--runtime/ftplugin/scheme.vim15
-rw-r--r--runtime/ftplugin/sh.vim6
-rw-r--r--runtime/ftplugin/slint.vim15
-rw-r--r--runtime/ftplugin/snakemake.vim13
-rw-r--r--runtime/ftplugin/sql.vim5
-rw-r--r--runtime/ftplugin/sshdconfig.vim10
-rw-r--r--runtime/ftplugin/stylus.vim54
-rw-r--r--runtime/ftplugin/svelte.vim13
-rw-r--r--runtime/ftplugin/tcl.vim3
-rw-r--r--runtime/ftplugin/typescript.vim3
-rw-r--r--runtime/ftplugin/typst.vim14
-rw-r--r--runtime/ftplugin/v.vim15
-rw-r--r--runtime/ftplugin/verilog.vim4
-rw-r--r--runtime/ftplugin/vim.vim3
-rw-r--r--runtime/ftplugin/wat.vim3
-rw-r--r--runtime/ftplugin/xdefaults.vim9
-rw-r--r--runtime/ftplugin/xml.vim3
-rw-r--r--runtime/ftplugin/zig.vim60
-rw-r--r--runtime/ftplugin/zsh.vim4
91 files changed, 673 insertions, 184 deletions
diff --git a/runtime/ftplugin/abaqus.vim b/runtime/ftplugin/abaqus.vim
index c16e7b0..d4bb6fe 100644
--- a/runtime/ftplugin/abaqus.vim
+++ b/runtime/ftplugin/abaqus.vim
@@ -3,6 +3,7 @@
" Maintainer: Carl Osterwisch <costerwi@gmail.com>
" Last Change: 2022 Oct 08
" 2024 Jan 14 by Vim Project (browsefilter)
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin") | finish | endif
@@ -27,7 +28,7 @@ setlocal isfname-=,
" Define format of comment lines (see 'formatoptions' for uses)
setlocal comments=:**
-setlocal commentstring=**%s
+setlocal commentstring=**\ %s
" Definitions start with a * and assign a NAME, NSET, or ELSET
" Used in [d ^wd and other commands
diff --git a/runtime/ftplugin/arduino.vim b/runtime/ftplugin/arduino.vim
new file mode 100644
index 0000000..60b11da
--- /dev/null
+++ b/runtime/ftplugin/arduino.vim
@@ -0,0 +1,67 @@
+" Vim filetype plugin file
+" Language: Arduino
+" Maintainer: The Vim Project <https://github.com/vim/vim>
+" Ken Takata <https://github.com/k-takata>
+" Last Change: 2024 Apr 12
+" 2024 Jun 02 by Riley Bruins <ribru17@gmail.com> ('commentstring')
+"
+" Most of the part was copied from c.vim.
+
+" Only do this when not done yet for this buffer
+if exists("b:did_ftplugin")
+ finish
+endif
+
+" Don't load another plugin for this buffer
+let b:did_ftplugin = 1
+
+" Using line continuation here.
+let s:cpo_save = &cpo
+set cpo-=C
+
+let b:undo_ftplugin = "setl fo< com< ofu< cms< def< inc<"
+
+if !exists("g:arduino_recommended_style") || g:arduino_recommended_style != 0
+ " Use the default setting of Arduino IDE.
+ setlocal expandtab tabstop=2 softtabstop=2 shiftwidth=2
+ let b:undo_ftplugin ..= " et< ts< sts< sw<"
+endif
+
+" Set 'formatoptions' to break comment lines but not other lines,
+" and insert the comment leader when hitting <CR> or using "o".
+setlocal fo-=t fo+=croql
+
+" These options have the right value as default, but the user may have
+" overruled that.
+setlocal commentstring=/*\ %s\ */ define& include&
+
+" Set completion with CTRL-X CTRL-O to autoloaded function.
+if exists('&ofu')
+ setlocal ofu=ccomplete#Complete
+endif
+
+" Set 'comments' to format dashed lists in comments.
+" Also include ///, used for Doxygen.
+setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://
+
+" When the matchit plugin is loaded, this makes the % command skip parens and
+" braces in comments properly.
+if !exists("b:match_words")
+ 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'
+ let b:undo_ftplugin ..= " | unlet! b:match_skip b:match_words"
+endif
+
+" Win32 and GTK can filter files in the browse dialog
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
+ let b:browsefilter = "Arduino Source Files (*.ino, *.pde)\t*.ino;*.pde\n"
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
+ endif
+ let b:undo_ftplugin ..= " | unlet! b:browsefilter"
+endif
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/asm.vim b/runtime/ftplugin/asm.vim
index 0ae1610..4482b90 100644
--- a/runtime/ftplugin/asm.vim
+++ b/runtime/ftplugin/asm.vim
@@ -4,13 +4,14 @@
" Last Change: 2020 May 23
" 2023 Aug 28 by Vim Project (undo_ftplugin)
" 2024 Apr 09 by Vim Project (add Matchit support)
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
setl include=^\\s*%\\s*include
setl comments=:;,s1:/*,mb:*,ex:*/,://
-setl commentstring=;%s
+setl commentstring=;\ %s
let b:undo_ftplugin = "setl commentstring< comments< include<"
diff --git a/runtime/ftplugin/astro.vim b/runtime/ftplugin/astro.vim
index 0b0e034..5d35ba9 100644
--- a/runtime/ftplugin/astro.vim
+++ b/runtime/ftplugin/astro.vim
@@ -2,6 +2,7 @@
" Language: Astro
" Maintainer: Romain Lafourcade <romainlafourcade@gmail.com>
" Last Change: 2024 Apr 21
+" 2024 May 24 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin")
finish
@@ -25,17 +26,17 @@ function! s:AstroComments() abort
\ || s:IdentifyScope('^\s*<script', '^\s*<\/script>')
" ECMAScript comments
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
- setlocal commentstring=//%s
+ setlocal commentstring=//\ %s
elseif s:IdentifyScope('^\s*<style', '^\s*<\/style>')
" CSS comments
setlocal comments=s1:/*,mb:*,ex:*/
- setlocal commentstring=/*%s*/
+ setlocal commentstring=/*\ %s\ */
else
" HTML comments
setlocal comments=s:<!--,m:\ \ \ \ ,e:-->
- setlocal commentstring=<!--%s-->
+ setlocal commentstring=<!--\ %s\ -->
endif
endfunction
diff --git a/runtime/ftplugin/bitbake.vim b/runtime/ftplugin/bitbake.vim
index 99fe334..4d50a7f 100644
--- a/runtime/ftplugin/bitbake.vim
+++ b/runtime/ftplugin/bitbake.vim
@@ -3,13 +3,14 @@
" Maintainer: Gregory Anders <greg@gpanders.com>
" Repository: https://github.com/openembedded/bitbake
" Latest Revision: 2022-07-23
+" 2024-05-23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
-setlocal commentstring=#%s
+setlocal commentstring=#\ %s
setlocal comments=:#
setlocal suffixesadd=.bb,.bbclass
diff --git a/runtime/ftplugin/c.vim b/runtime/ftplugin/c.vim
index e2eebc5..378d580 100644
--- a/runtime/ftplugin/c.vim
+++ b/runtime/ftplugin/c.vim
@@ -2,6 +2,7 @@
" Language: C
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 22
+" 2024 Jun 02 by Riley Bruins <ribru17@gmail.com> ('commentstring')
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only do this when not done yet for this buffer
@@ -24,7 +25,7 @@ setlocal fo-=t fo+=croql
" These options have the right value as default, but the user may have
" overruled that.
-setlocal commentstring& define& include&
+setlocal commentstring=/*\ %s\ */ define& include&
" Set completion with CTRL-X CTRL-O to autoloaded function.
if exists('&ofu')
diff --git a/runtime/ftplugin/calendar.vim b/runtime/ftplugin/calendar.vim
index f454ba1..c4e683a 100644
--- a/runtime/ftplugin/calendar.vim
+++ b/runtime/ftplugin/calendar.vim
@@ -2,6 +2,7 @@
" Language: calendar(1) input file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
+" 2024-06-02 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin")
finish
@@ -13,7 +14,7 @@ set cpo&vim
let b:undo_ftplugin = "setl com< cms< inc< fo<"
-setlocal comments=s1:/*,mb:*,ex:*/ commentstring& include&
+setlocal comments=s1:/*,mb:*,ex:*/ commentstring=/*\ %s\ */ include&
setlocal formatoptions-=t formatoptions+=croql
let &cpo = s:cpo_save
diff --git a/runtime/ftplugin/cgdbrc.vim b/runtime/ftplugin/cgdbrc.vim
index 46cf135..99f9702 100644
--- a/runtime/ftplugin/cgdbrc.vim
+++ b/runtime/ftplugin/cgdbrc.vim
@@ -3,6 +3,7 @@
" Maintainer: Wu, Zhenyu <wuzhenyu@ustc.edu>
" Documentation: https://cgdb.github.io/docs/Configuring-CGDB.html
" Latest Revision: 2024-04-09
+" 2024-05-23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists('b:did_ftplugin')
finish
@@ -14,7 +15,7 @@ set cpoptions&vim
let b:undo_ftplugin = 'setl com< cms<'
-setlocal commentstring=#%s
+setlocal commentstring=#\ %s
setlocal comments=:#
let &cpoptions = s:save_cpoptions
diff --git a/runtime/ftplugin/cpp.vim b/runtime/ftplugin/cpp.vim
index fc92935..fac3edd 100644
--- a/runtime/ftplugin/cpp.vim
+++ b/runtime/ftplugin/cpp.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: C++
" Maintainer: The Vim Project <https://github.com/vim/vim>
-" Last Change: 2023 Aug 10
+" Last Change: 2024 Jun 06
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only do this when not done yet for this buffer
@@ -12,6 +12,10 @@ endif
" Behaves mostly just like C
runtime! ftplugin/c.vim ftplugin/c_*.vim ftplugin/c/*.vim
+" Change 'commentstring' to "C++ style"/"mono-line" comments
+setlocal commentstring=//\ %s
+let b:undo_ftplugin ..= ' | setl commentstring<'
+
" C++ uses templates with <things>
" Disabled, because it gives an error for typing an unmatched ">".
" set matchpairs+=<:>
diff --git a/runtime/ftplugin/csh.vim b/runtime/ftplugin/csh.vim
index a22bee3..74666b9 100644
--- a/runtime/ftplugin/csh.vim
+++ b/runtime/ftplugin/csh.vim
@@ -4,6 +4,7 @@
" Previous Maintainer: Dan Sharp
" Contributor: Johannes Zellner <johannes@zellner.org>
" Last Change: 2024 Jan 14
+" 2024 May 23 by Riley Bruins ('commentstring')
if exists("b:did_ftplugin")
finish
@@ -14,7 +15,7 @@ let s:save_cpo = &cpo
set cpo-=C
setlocal comments=:#
-setlocal commentstring=#%s
+setlocal commentstring=#\ %s
setlocal formatoptions-=t
setlocal formatoptions+=crql
diff --git a/runtime/ftplugin/css.vim b/runtime/ftplugin/css.vim
index ece2def..778a9e1 100644
--- a/runtime/ftplugin/css.vim
+++ b/runtime/ftplugin/css.vim
@@ -3,6 +3,7 @@
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Last Change: 2020 Dec 21
+" 2024 Jun 02 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin")
finish
@@ -14,7 +15,7 @@ set cpo&vim
let b:undo_ftplugin = "setl com< cms< inc< fo< ofu< isk<"
-setlocal comments=s1:/*,mb:*,ex:*/ commentstring&
+setlocal comments=s1:/*,mb:*,ex:*/ commentstring=/*\ %s\ */
setlocal formatoptions-=t formatoptions+=croql
setlocal omnifunc=csscomplete#CompleteCSS
setlocal iskeyword+=-
diff --git a/runtime/ftplugin/dart.vim b/runtime/ftplugin/dart.vim
new file mode 100644
index 0000000..42c90c2
--- /dev/null
+++ b/runtime/ftplugin/dart.vim
@@ -0,0 +1,15 @@
+" Vim filetype plugin
+" Language: dart
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 May 18
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+" Set 'comments' to format dashed lists in comments.
+" Also include ///, used for Doxygen.
+setl comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// commentstring=//\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/deb822sources.vim b/runtime/ftplugin/deb822sources.vim
index 4936f42..31c81b1 100644
--- a/runtime/ftplugin/deb822sources.vim
+++ b/runtime/ftplugin/deb822sources.vim
@@ -1,6 +1,6 @@
" Language: Debian sources.list
" Maintainer: Debian Vim Maintainers <team+vim@tracker.debian.org>
-" Last Change: 2024 Mar 20
+" Last Change: 2024 May 25
" License: Vim License
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/ftplugin/deb822sources.vim
@@ -10,7 +10,7 @@ endif
let b:did_ftplugin=1
setlocal comments=:#
-setlocal commentstring=#%s
+setlocal commentstring=#\ %s
setlocal formatoptions-=t
let b:undo_ftplugin = 'setlocal comments< commentstring< formatoptions<'
diff --git a/runtime/ftplugin/debcontrol.vim b/runtime/ftplugin/debcontrol.vim
index bb710e5..5b8292b 100644
--- a/runtime/ftplugin/debcontrol.vim
+++ b/runtime/ftplugin/debcontrol.vim
@@ -2,7 +2,7 @@
" Language: Debian control files
" Maintainer: Debian Vim Maintainers
" Former Maintainer: Pierre Habouzit <madcoder@debian.org>
-" Last Change: 2023 Jan 16
+" Last Change: 2024 May 25
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/ftplugin/debcontrol.vim
" Do these settings once per buffer
@@ -19,8 +19,11 @@ if exists('g:debcontrol_fold_enable')
endif
setlocal textwidth=0
+setlocal comments=:#
+setlocal commentstring=#\ %s
+
" Clean unloading
-let b:undo_ftplugin = 'setlocal tw< foldmethod< foldexpr< foldtext<'
+let b:undo_ftplugin = 'setlocal tw< foldmethod< foldexpr< foldtext< comments< commentstring<'
" }}}1
diff --git a/runtime/ftplugin/debsources.vim b/runtime/ftplugin/debsources.vim
index cbb4faf..2c5ea35 100644
--- a/runtime/ftplugin/debsources.vim
+++ b/runtime/ftplugin/debsources.vim
@@ -1,6 +1,6 @@
" Language: Debian sources.list
" Maintainer: Debian Vim Maintainers <team+vim@tracker.debian.org>
-" Last Change: 2023 Aug 30
+" Last Change: 2024 May 25
" License: Vim License
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/ftplugin/debsources.vim
@@ -10,7 +10,7 @@ endif
let b:did_ftplugin=1
setlocal comments=:#
-setlocal commentstring=#%s
+setlocal commentstring=#\ %s
setlocal formatoptions-=t
let b:undo_ftplugin = 'setlocal comments< commentstring< formatoptions<'
diff --git a/runtime/ftplugin/desktop.vim b/runtime/ftplugin/desktop.vim
index bd6fd70..d15afd2 100644
--- a/runtime/ftplugin/desktop.vim
+++ b/runtime/ftplugin/desktop.vim
@@ -2,6 +2,7 @@
" Language: XDG desktop entry
" Maintainer: Eisuke Kawashima ( e.kawaschima+vim AT gmail.com )
" Last Change: 2022-07-26
+" 2024-05-24 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists('b:did_ftplugin')
finish
@@ -9,5 +10,5 @@ endif
let b:did_ftplugin = v:true
setl comments=:#
-setl commentstring=#%s
+setl commentstring=#\ %s
let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/dtd.vim b/runtime/ftplugin/dtd.vim
index bea8c5c..f970148 100644
--- a/runtime/ftplugin/dtd.vim
+++ b/runtime/ftplugin/dtd.vim
@@ -6,6 +6,7 @@
" Former maintainer: Dan Sharp
" Last Change: 2009 Jan 20
" 2024 Jan 14 by Vim Project (browsefilter)
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
@@ -15,7 +16,7 @@ let b:did_ftplugin = 1
let s:save_cpo = &cpo
set cpo-=C
-setlocal commentstring=<!--%s-->
+setlocal commentstring=<!--\ %s\ -->
setlocal comments=s:<!--,m:\ \ \ \ \ ,e:-->
setlocal formatoptions-=t
diff --git a/runtime/ftplugin/dtrace.vim b/runtime/ftplugin/dtrace.vim
index 9288097..a276b31 100644
--- a/runtime/ftplugin/dtrace.vim
+++ b/runtime/ftplugin/dtrace.vim
@@ -1,6 +1,7 @@
" Language: D script as described in "Solaris Dynamic Tracing Guide",
" http://docs.sun.com/app/docs/doc/817-6223
" Last Change: 2008/03/20
+" 2024/05/23 by Riley Bruins <ribru17@gmail.com ('commentstring')
" Version: 1.2
" Maintainer: Nicolas Weber <nicolasweber@gmx.de>
@@ -26,8 +27,8 @@ setlocal fo-=t fo+=croql
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/
" dtrace uses /* */ comments. Set this explicitly, just in case the user
-" changed this (/*%s*/ is the default)
-setlocal commentstring=/*%s*/
+" changed this (/*\ %s\ */ is the default)
+setlocal commentstring=/*\ %s\ */
setlocal iskeyword+=@,$
diff --git a/runtime/ftplugin/dts.vim b/runtime/ftplugin/dts.vim
index 42e3833..346ff94 100644
--- a/runtime/ftplugin/dts.vim
+++ b/runtime/ftplugin/dts.vim
@@ -2,6 +2,7 @@
" Language: dts/dtsi (device tree files)
" Maintainer: Wu, Zhenyu <wuzhenyu@ustc.edu>
" Latest Revision: 2024 Apr 12
+" 2024 Jun 02 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists('b:did_ftplugin')
finish
@@ -12,5 +13,5 @@ let b:undo_ftplugin = 'setl inc< cms< com<'
setlocal include=^\\%(#include\\\|/include/\\)
" same as C
-setlocal commentstring&
+setlocal commentstring=/*\ %s\ */
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://
diff --git a/runtime/ftplugin/erlang.vim b/runtime/ftplugin/erlang.vim
index 1cb57f4..5a3ab71 100644
--- a/runtime/ftplugin/erlang.vim
+++ b/runtime/ftplugin/erlang.vim
@@ -6,7 +6,8 @@
" Eduardo Lopez (http://github.com/tapichu)
" Arvid Bjurklint (http://github.com/slarwise)
" Paweł Zacharek (http://github.com/subc2)
-" Last Update: 2023-Dec-20
+" Riley Bruins (http://github.com/ribru17) ('commentstring')
+" Last Update: 2024 May 23
" License: Vim license
" URL: https://github.com/vim-erlang/vim-erlang-runtime
@@ -27,7 +28,7 @@ if get(g:, 'erlang_folding', 0)
endif
setlocal comments=:%%%,:%%,:%
-setlocal commentstring=%%s
+setlocal commentstring=%\ %s
setlocal formatoptions+=ro
diff --git a/runtime/ftplugin/eruby.vim b/runtime/ftplugin/eruby.vim
index b5c4665..b3e074a 100644
--- a/runtime/ftplugin/eruby.vim
+++ b/runtime/ftplugin/eruby.vim
@@ -5,6 +5,7 @@
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2022 May 15
" 2024 Jan 14 by Vim Project (browsefilter)
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -125,7 +126,7 @@ if exists("loaded_matchit")
endif
" TODO: comments=
-setlocal commentstring=<%#%s%>
+setlocal commentstring=<%#\ %s\ %>
let b:undo_ftplugin = "setl cms< " .
\ " | unlet! b:browsefilter b:match_words | " . b:undo_ftplugin
diff --git a/runtime/ftplugin/fennel.vim b/runtime/ftplugin/fennel.vim
index 93cf366..2a9623f 100644
--- a/runtime/ftplugin/fennel.vim
+++ b/runtime/ftplugin/fennel.vim
@@ -2,13 +2,14 @@
" Language: Fennel
" Maintainer: Gregory Anders <greg[NOSPAM]@gpanders.com>
" Last Update: 2023 Jun 9
+" 2024 May 24 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
-setlocal commentstring=;%s
+setlocal commentstring=;\ %s
setlocal comments=:;;,:;
setlocal formatoptions-=t
setlocal suffixesadd=.fnl
diff --git a/runtime/ftplugin/fish.vim b/runtime/ftplugin/fish.vim
index f06ad3a..55d7ea8 100644
--- a/runtime/ftplugin/fish.vim
+++ b/runtime/ftplugin/fish.vim
@@ -4,6 +4,7 @@
" Repository: https://github.com/nickeb96/fish.vim
" Last Change: February 1, 2023
" 2023 Aug 28 by Vim Project (undo_ftplugin)
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin")
finish
@@ -12,7 +13,7 @@ let b:did_ftplugin = 1
setlocal iskeyword=@,48-57,_,192-255,-,.
setlocal comments=:#
-setlocal commentstring=#%s
+setlocal commentstring=#\ %s
setlocal formatoptions+=crjq
let b:undo_ftplugin = "setl cms< com< fo< isk<"
diff --git a/runtime/ftplugin/fortran.vim b/runtime/ftplugin/fortran.vim
index 3c32581..19a4c1e 100644
--- a/runtime/ftplugin/fortran.vim
+++ b/runtime/ftplugin/fortran.vim
@@ -11,6 +11,7 @@
" Doug Kearns, and Fritz Reese.
" Last Change: 2023 Dec 22
" 2024 Jan 14 by Vim Project (browsefilter)
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
" Only do these settings when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -89,7 +90,7 @@ else
endif
" Set commentstring for foldmethod=marker
-setlocal cms=!%s
+setlocal cms=!\ %s
" Tabs are not a good idea in Fortran so the default is to expand tabs
if !exists("fortran_have_tabs")
diff --git a/runtime/ftplugin/fstab.vim b/runtime/ftplugin/fstab.vim
index 9980532..0e7ffda 100644
--- a/runtime/ftplugin/fstab.vim
+++ b/runtime/ftplugin/fstab.vim
@@ -3,6 +3,7 @@
" Maintainer: Radu Dineiu <radu.dineiu@gmail.com>
" URL: https://raw.github.com/rid9/vim-fstab/master/ftplugin/fstab.vim
" Last Change: 2021 Jan 02
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
" Version: 1.0
"
" Credits:
@@ -13,7 +14,7 @@ if exists("b:did_ftplugin")
endif
let b:did_ftplugin = 1
-setlocal commentstring=#%s
+setlocal commentstring=#\ %s
let b:undo_ftplugin = "setlocal commentstring<"
" vim: ts=8 ft=vim
diff --git a/runtime/ftplugin/gdb.vim b/runtime/ftplugin/gdb.vim
index 7c10633..af88a04 100644
--- a/runtime/ftplugin/gdb.vim
+++ b/runtime/ftplugin/gdb.vim
@@ -3,11 +3,12 @@
" Maintainer: Michaël Peeters <NOSPAMm.vim@noekeon.org>
" Last Changed: 2017-10-26
" 2024-04-10: - add Matchit support (by Vim Project)
+" 2024-04-23: - add space to commentstring (by Riley Bruins) ('commentstring')
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
-setlocal commentstring=#%s
+setlocal commentstring=#\ %s
setlocal include=^\\s*source
" Undo the stuff we changed.
diff --git a/runtime/ftplugin/graphql.vim b/runtime/ftplugin/graphql.vim
new file mode 100644
index 0000000..56f6e36
--- /dev/null
+++ b/runtime/ftplugin/graphql.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin
+" Language: graphql
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 May 18
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setl comments=:# commentstring=#\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/groovy.vim b/runtime/ftplugin/groovy.vim
index cc7d6e3..a2e2b2f 100644
--- a/runtime/ftplugin/groovy.vim
+++ b/runtime/ftplugin/groovy.vim
@@ -2,6 +2,7 @@
" Language: groovy
" Maintainer: Justin M. Keyes <justinkz@gmail.com>
" Last Change: 2016 May 22
+" 2024 May 24 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists('b:did_ftplugin')
finish
@@ -13,7 +14,7 @@ set cpo-=C
let b:undo_ftplugin = 'setlocal commentstring<'
-setlocal commentstring=//%s
+setlocal commentstring=//\ %s
let &cpo = s:cpo_save
unlet s:cpo_save
diff --git a/runtime/ftplugin/hamster.vim b/runtime/ftplugin/hamster.vim
index 5446e72..904f267 100644
--- a/runtime/ftplugin/hamster.vim
+++ b/runtime/ftplugin/hamster.vim
@@ -3,6 +3,7 @@
" Version: 2.0.6.0
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Last Change: 2021 Jan 19
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -31,7 +32,7 @@ if &tw == 0
endif
" Comments start with a double quote
-setlocal commentstring=#%s
+setlocal commentstring=#\ %s
" Move around functions.
noremap <silent><buffer> [[ :call search('^\s*sub\>', "bW")<CR>
diff --git a/runtime/ftplugin/hare.vim b/runtime/ftplugin/hare.vim
index 0200ba5..422bb7b 100644
--- a/runtime/ftplugin/hare.vim
+++ b/runtime/ftplugin/hare.vim
@@ -1,35 +1,59 @@
-" Vim filetype plugin
-" Language: Hare
-" Maintainer: Amelia Clarke <me@rsaihe.dev>
-" Previous Maintainer: Drew DeVault <sir@cmpwn.com>
-" Last Updated: 2022-09-28
-" 2023 Aug 28 by Vim Project (undo_ftplugin)
+" Vim filetype plugin.
+" Language: Hare
+" Maintainer: Amelia Clarke <selene@perilune.dev>
+" Last Updated: 2024-05-10
+" Upstream: https://git.sr.ht/~sircmpwn/hare.vim
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
-" Formatting settings.
-setlocal formatoptions-=t formatoptions+=croql/
+let s:cpo_save = &cpo
+set cpo&vim
+
+" Set the default compiler.
+compiler hare
-" Miscellaneous.
+" Formatting settings.
setlocal comments=://
setlocal commentstring=//\ %s
+setlocal formatlistpat=^\ \\?-\
+setlocal formatoptions+=croqnlj/ formatoptions-=t
+
+" Search for Hare modules.
+setlocal include=^\\s*use\\>
+setlocal includeexpr=hare#FindModule(v:fname)
+setlocal isfname+=:
setlocal suffixesadd=.ha
-let b:undo_ftplugin = "setl cms< com< fo< sua<"
+" Add HAREPATH to the default search paths.
+setlocal path-=/usr/include,,
+let &l:path .= ',' .. hare#GetPath() .. ',,'
-" Hare recommended style.
-if get(g:, "hare_recommended_style", 1)
+let b:undo_ftplugin = 'setl cms< com< flp< fo< inc< inex< isf< pa< sua< mp<'
+
+" Follow the Hare style guide by default.
+if get(g:, 'hare_recommended_style', 1)
setlocal noexpandtab
- setlocal shiftwidth=8
+ setlocal shiftwidth=0
setlocal softtabstop=0
setlocal tabstop=8
setlocal textwidth=80
- let b:undo_ftplugin ..= " | setl et< sts< sw< ts< tw<"
+ let b:undo_ftplugin .= ' et< sts< sw< ts< tw<'
endif
-compiler hare
+augroup hare.vim
+ autocmd!
+
+ " Highlight whitespace errors by default.
+ if get(g:, 'hare_space_error', 1)
+ autocmd InsertEnter * hi link hareSpaceError NONE
+ autocmd InsertLeave * hi link hareSpaceError Error
+ endif
+augroup END
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
-" vim: et sw=2 sts=2 ts=8
+" vim: et sts=2 sw=2 ts=8
diff --git a/runtime/ftplugin/haredoc.vim b/runtime/ftplugin/haredoc.vim
new file mode 100644
index 0000000..69030b4
--- /dev/null
+++ b/runtime/ftplugin/haredoc.vim
@@ -0,0 +1,44 @@
+" Vim filetype plugin.
+" Language: Haredoc (Hare documentation format)
+" Maintainer: Amelia Clarke <selene@perilune.dev>
+" Last Updated: 2024-05-02
+" Upstream: https://git.sr.ht/~selene/hare.vim
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+" Formatting settings.
+setlocal comments=:\
+setlocal formatlistpat=^\ \\?-\
+setlocal formatoptions+=tnlj formatoptions-=c formatoptions-=q
+
+" Search for Hare modules.
+setlocal includeexpr=hare#FindModule(v:fname)
+setlocal isfname+=:
+setlocal suffixesadd=.ha
+
+" Add HAREPATH to the default search paths.
+setlocal path-=/usr/include,,
+let &l:path .= ',' .. hare#GetPath() .. ',,'
+
+let b:undo_ftplugin = 'setl com< flp< fo< inex< isf< pa< sua<'
+
+" Follow the Hare style guide by default.
+if get(g:, 'hare_recommended_style', 1)
+ setlocal noexpandtab
+ setlocal shiftwidth=0
+ setlocal softtabstop=0
+ setlocal tabstop=8
+ setlocal textwidth=80
+ let b:undo_ftplugin .= ' et< sts< sw< ts< tw<'
+endif
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
+" vim: et sts=2 sw=2 ts=8
diff --git a/runtime/ftplugin/html.vim b/runtime/ftplugin/html.vim
index 3aa60a8..5495f85 100644
--- a/runtime/ftplugin/html.vim
+++ b/runtime/ftplugin/html.vim
@@ -3,6 +3,7 @@
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Dan Sharp
" Last Change: 2024 Jan 14
+" 2024 May 24 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin")
finish
@@ -13,7 +14,7 @@ let s:save_cpo = &cpo
set cpo-=C
setlocal matchpairs+=<:>
-setlocal commentstring=<!--%s-->
+setlocal commentstring=<!--\ %s\ -->
setlocal comments=s:<!--,m:\ \ \ \ ,e:-->
let b:undo_ftplugin = "setlocal comments< commentstring< matchpairs<"
diff --git a/runtime/ftplugin/hyprlang.vim b/runtime/ftplugin/hyprlang.vim
new file mode 100644
index 0000000..5c186c3
--- /dev/null
+++ b/runtime/ftplugin/hyprlang.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin
+" Language: hyprlang
+" Maintainer: ribru17 <ribru17@gmail.com>
+" Last Change: 2024 May 18
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setl comments=:# commentstring=#\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/indent.vim b/runtime/ftplugin/indent.vim
index 64a650a..32208d3 100644
--- a/runtime/ftplugin/indent.vim
+++ b/runtime/ftplugin/indent.vim
@@ -3,6 +3,7 @@
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
+" 2024-06-02 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin")
finish
@@ -14,7 +15,7 @@ set cpo&vim
let b:undo_ftplugin = "setl com< cms< fo<"
-setlocal comments=s1:/*,mb:*,ex:*/ commentstring&
+setlocal comments=s1:/*,mb:*,ex:*/ commentstring=/*\ %s\ */
setlocal formatoptions-=t formatoptions+=croql
let &cpo = s:cpo_save
diff --git a/runtime/ftplugin/initex.vim b/runtime/ftplugin/initex.vim
index 0ee3e8d..71049df 100644
--- a/runtime/ftplugin/initex.vim
+++ b/runtime/ftplugin/initex.vim
@@ -3,6 +3,7 @@
" Maintainer: Benji Fisher, Ph.D. <benji@member.AMS.org>
" Version: 1.0
" Last Change: Wed 19 Apr 2006
+" Last Change: Thu 23 May 2024 by Riley Bruins <ribru17@gmail.com> ('commentstring')
" Only do this when not done yet for this buffer.
if exists("b:did_ftplugin")
@@ -23,7 +24,7 @@ setlocal com=sO:%\ -,mO:%\ \ ,eO:%%,:%
" Set 'commentstring' to recognize the % comment character:
" (Thanks to Ajit Thakkar.)
-setlocal cms=%%s
+setlocal cms=%\ %s
" Allow "[d" to be used to find a macro definition:
let &l:define='\\\([egx]\|char\|mathchar\|count\|dimen\|muskip\|skip\|toks\)\='
diff --git a/runtime/ftplugin/java.vim b/runtime/ftplugin/java.vim
index fa2b610..eee7ef0 100644
--- a/runtime/ftplugin/java.vim
+++ b/runtime/ftplugin/java.vim
@@ -5,6 +5,7 @@
" Repository: https://github.com/zzzyxwvut/java-vim.git
" Last Change: 2024 Apr 18
" 2024 Jan 14 by Vim Project (browsefilter)
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
@@ -61,7 +62,7 @@ setlocal formatoptions-=t formatoptions+=croql
" Set 'comments' to format dashed lists in comments. Behaves just like C.
setlocal comments& comments^=sO:*\ -,mO:*\ \ ,exO:*/
-setlocal commentstring=//%s
+setlocal commentstring=//\ %s
" Change the :browse e filter to primarily show Java-related files.
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
diff --git a/runtime/ftplugin/javascript.vim b/runtime/ftplugin/javascript.vim
index 2633954..455b794 100644
--- a/runtime/ftplugin/javascript.vim
+++ b/runtime/ftplugin/javascript.vim
@@ -3,6 +3,7 @@
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Contributor: Romain Lafourcade <romainlafourcade@gmail.com>
" Last Change: 2024 Jan 14
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin")
finish
@@ -24,7 +25,7 @@ endif
" Set 'comments' to format dashed lists in comments.
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
-setlocal commentstring=//%s
+setlocal commentstring=//\ %s
" Change the :browse e filter to primarily show JavaScript-related files.
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
diff --git a/runtime/ftplugin/jj.vim b/runtime/ftplugin/jj.vim
new file mode 100644
index 0000000..cc5d700
--- /dev/null
+++ b/runtime/ftplugin/jj.vim
@@ -0,0 +1,19 @@
+" Vim filetype plugin
+" Language: jj description
+" Maintainer: Gregory Anders <greg@gpanders.com>
+" Last Change: 2024 May 8
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+" Use the same formatoptions and textwidth as the gitcommit ftplugin
+setlocal nomodeline formatoptions+=tl textwidth=72
+setlocal formatoptions-=c formatoptions-=r formatoptions-=o formatoptions-=q formatoptions+=n
+setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}]\\s\\+\\\|^\\s*[-*+]\\s\\+
+
+setlocal comments=b:JJ:
+setlocal commentstring=JJ:\ %s
+
+let b:undo_ftplugin = 'setl modeline< formatoptions< textwidth< formatlistpat< comments< commentstring<'
diff --git a/runtime/ftplugin/jq.vim b/runtime/ftplugin/jq.vim
index 15cd400..d258836 100644
--- a/runtime/ftplugin/jq.vim
+++ b/runtime/ftplugin/jq.vim
@@ -1,7 +1,8 @@
" Vim compiler file
" Language: jq
" Maintainer: Vito <vito.blog@gmail.com>
-" Last Change: 2024 Apr 17
+" Last Change: 2024 Apr 29
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
" Upstream: https://github.com/vito-c/jq.vim
if exists('b:did_ftplugin')
@@ -9,10 +10,8 @@ if exists('b:did_ftplugin')
endif
let b:did_ftplugin = 1
-let b:undo_ftplugin = 'setl commentstring<'
-
-setlocal commentstring=#%s
+setlocal include=^\\s*\\%(import\\\|include\\)
+setlocal commentstring=#\ %s
compiler jq
-let &cpoptions = s:save_cpoptions
-unlet s:save_cpoptions
+let b:undo_ftplugin = 'setl commentstring< include<'
diff --git a/runtime/ftplugin/jsonc.vim b/runtime/ftplugin/jsonc.vim
index e47a75f..ec32684 100644
--- a/runtime/ftplugin/jsonc.vim
+++ b/runtime/ftplugin/jsonc.vim
@@ -5,6 +5,7 @@
" https://github.com/kevinoid/vim-jsonc
" License: MIT
" Last Change: 2021 Nov 22
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
runtime! ftplugin/json.vim
@@ -15,7 +16,7 @@ else
endif
" Set comment (formatting) related options. {{{1
-setlocal commentstring=//%s comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
+setlocal commentstring=//\ %s comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
" Let Vim know how to disable the plug-in.
let b:undo_ftplugin = 'setlocal commentstring< comments<'
diff --git a/runtime/ftplugin/kdl.vim b/runtime/ftplugin/kdl.vim
new file mode 100644
index 0000000..c9a1d8b
--- /dev/null
+++ b/runtime/ftplugin/kdl.vim
@@ -0,0 +1,17 @@
+" Vim filetype plugin
+" Language: KDL
+" Author: Aram Drevekenin <aram@poor.dev>
+" Maintainer: Yinzuo Jiang <jiangyinzuo@foxmail.com>
+" Last Change: 2024-06-10
+
+if exists("b:did_ftplugin")
+ finish
+endif
+
+let b:did_ftplugin = 1
+
+setlocal comments=://
+setlocal commentstring=//\ %s
+setlocal formatoptions-=t
+
+let b:undo_ftplugin = 'setlocal comments< commentstring< formatoptions<'
diff --git a/runtime/ftplugin/lc.vim b/runtime/ftplugin/lc.vim
new file mode 100644
index 0000000..e818f1a
--- /dev/null
+++ b/runtime/ftplugin/lc.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin
+" Language: Elsa
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 May 25
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setl comments=:-- commentstring=--\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/ld.vim b/runtime/ftplugin/ld.vim
index 1ab80d5..9cc70bd 100644
--- a/runtime/ftplugin/ld.vim
+++ b/runtime/ftplugin/ld.vim
@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: ld(1) script
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
+" Latest Revision: 2008 Jul 09
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin")
finish
@@ -13,7 +14,7 @@ set cpo&vim
let b:undo_ftplugin = "setl com< cms< inc< fo<"
-setlocal comments=s1:/*,mb:*,ex:*/ commentstring=/*%s*/ include=^\\s*INCLUDE
+setlocal comments=s1:/*,mb:*,ex:*/ commentstring=/*\ %s\ */ include=^\\s*INCLUDE
setlocal formatoptions-=t formatoptions+=croql
let &cpo = s:cpo_save
diff --git a/runtime/ftplugin/liquid.vim b/runtime/ftplugin/liquid.vim
index f24ec4c..dbd8abe 100644
--- a/runtime/ftplugin/liquid.vim
+++ b/runtime/ftplugin/liquid.vim
@@ -2,6 +2,7 @@
" Language: Liquid
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2022 Mar 15
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists('b:did_ftplugin')
finish
@@ -56,6 +57,6 @@ if exists('loaded_matchit')
let b:match_words .= '\<\%(if\w*\|unless\|case\)\>:\<\%(elsif\|else\|when\)\>:\<end\%(if\w*\|unless\|case\)\>,\<\%(for\|tablerow\)\>:\%({%\s*\)\@<=empty\>:\<end\%(for\|tablerow\)\>,\<\(capture\|comment\|highlight\)\>:\<end\1\>'
endif
-setlocal commentstring={%\ comment\ %}%s{%\ endcomment\ %}
+setlocal commentstring={%\ comment\ %}\ %s\ {%\ endcomment\ %}
let b:undo_ftplugin .= 'setl cms< | unlet! b:browsefilter b:match_words'
diff --git a/runtime/ftplugin/lisp.vim b/runtime/ftplugin/lisp.vim
index db3ac96..fe3c6fe 100644
--- a/runtime/ftplugin/lisp.vim
+++ b/runtime/ftplugin/lisp.vim
@@ -5,6 +5,7 @@
" Original author: Dorai Sitaram <ds26@gte.com>
" Original URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html
" Last Change: Mar 10, 2021
+" May 23, 2024 by Riley Bruins <ribru17@gmail.com> ('commentstring')
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -19,6 +20,6 @@ setl define=^\\s*(def\\k*
setl formatoptions-=t
setl iskeyword+=+,-,*,/,%,<,=,>,:,$,?,!,@-@,94
setl lisp
-setl commentstring=;%s
+setl commentstring=;\ %s
let b:undo_ftplugin = "setlocal comments< define< formatoptions< iskeyword< lisp< commentstring<"
diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim
index a2c33bc..91e8a8b 100644
--- a/runtime/ftplugin/man.vim
+++ b/runtime/ftplugin/man.vim
@@ -3,7 +3,7 @@
" Maintainer: Jason Franklin <vim@justemail.net>
" Maintainer: SungHyun Nam <goweol@gmail.com>
" Autoload Split: Bram Moolenaar
-" Last Change: 2023 Mar 21
+" Last Change: 2024 Jun 06 (disabled the q mapping, #8210)
" To make the ":Man" command available before editing a manual page, source
" this script from your startup vimrc file.
@@ -39,14 +39,16 @@ if &filetype == "man"
nnoremap <buffer> <silent> <c-]> :call dist#man#PreGetPage(v:count)<CR>
nnoremap <buffer> <silent> <c-t> :call dist#man#PopPage()<CR>
- nnoremap <buffer> <silent> q :q<CR>
+ " Disabled, since this hides the ability to record a macro or use the
+ " command line window
+ " nnoremap <buffer> <silent> q :q<CR>
" Add undo commands for the maps
let b:undo_ftplugin = b:undo_ftplugin
\ . '|silent! nunmap <buffer> <Plug>ManBS'
\ . '|silent! nunmap <buffer> <c-]>'
\ . '|silent! nunmap <buffer> <c-t>'
- \ . '|silent! nunmap <buffer> q'
+ "\ . '|silent! nunmap <buffer> q'
endif
if exists('g:ft_man_folding_enable') && (g:ft_man_folding_enable == 1)
diff --git a/runtime/ftplugin/markdown.vim b/runtime/ftplugin/markdown.vim
index 022dd0d..d4ee5ac 100644
--- a/runtime/ftplugin/markdown.vim
+++ b/runtime/ftplugin/markdown.vim
@@ -2,6 +2,7 @@
" Language: Markdown
" Maintainer: Tim Pope <https://github.com/tpope/vim-markdown>
" Last Change: 2023 Dec 28
+" 2024 May 24 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin")
finish
@@ -12,7 +13,7 @@ runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
let s:keepcpo= &cpo
set cpo&vim
-setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=<!--%s-->
+setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=<!--\ %s\ -->
setlocal formatoptions+=tcqln formatoptions-=r formatoptions-=o
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+\\\|^\\[^\\ze[^\\]]\\+\\]:\\&^.\\{4\\}
diff --git a/runtime/ftplugin/mma.vim b/runtime/ftplugin/mma.vim
index ce4cee1..91a8111 100644
--- a/runtime/ftplugin/mma.vim
+++ b/runtime/ftplugin/mma.vim
@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: Mathematica
" Maintainer: Ian Ford <ianf@wolfram.com>
-" Last Change: 22 January 2019
+" Last Change: 2019 Jan 22
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -13,4 +14,4 @@ let b:did_ftplugin = 1
let b:undo_ftplugin = "setlocal commentstring<"
-setlocal commentstring=\(*%s*\)
+setlocal commentstring=\(*\ %s\ *\)
diff --git a/runtime/ftplugin/modula2.vim b/runtime/ftplugin/modula2.vim
index 9c1acc2..306688d 100644
--- a/runtime/ftplugin/modula2.vim
+++ b/runtime/ftplugin/modula2.vim
@@ -2,6 +2,7 @@
" Language: Modula-2
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2024 Jan 14
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin")
finish
@@ -17,7 +18,7 @@ if s:dialect ==# "r10"
setlocal comments=s:(*,m:\ ,e:*),:!
setlocal commentstring=!\ %s
else
- setlocal commentstring=(*%s*)
+ setlocal commentstring=(*\ %s\ *)
setlocal comments=s:(*,m:\ ,e:*)
endif
setlocal formatoptions-=t formatoptions+=croql
diff --git a/runtime/ftplugin/modula3.vim b/runtime/ftplugin/modula3.vim
index 45dd7ca..f899d1d 100644
--- a/runtime/ftplugin/modula3.vim
+++ b/runtime/ftplugin/modula3.vim
@@ -2,6 +2,7 @@
" Language: Modula-3
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2024 Jan 14
+" 2024 May 24 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin")
finish
@@ -12,7 +13,7 @@ let s:cpo_save = &cpo
set cpo&vim
setlocal comments=s0:(*,mb:\ ,ex:*)
-setlocal commentstring=(*%s*)
+setlocal commentstring=(*\ %s\ *)
setlocal formatoptions-=t formatoptions+=croql
setlocal suffixesadd+=.m3
setlocal formatprg=m3pp
diff --git a/runtime/ftplugin/nim.vim b/runtime/ftplugin/nim.vim
new file mode 100644
index 0000000..4ab8b7b
--- /dev/null
+++ b/runtime/ftplugin/nim.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin
+" Language: nim
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 May 19
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setl comments=exO:]#,fs1:#[,mb:*,ex:]#,:# commentstring=#\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/nroff.vim b/runtime/ftplugin/nroff.vim
index cf62d02..ed0b32f 100644
--- a/runtime/ftplugin/nroff.vim
+++ b/runtime/ftplugin/nroff.vim
@@ -2,15 +2,15 @@
" Language: roff(7)
" Maintainer: Aman Verma
" Homepage: https://github.com/a-vrma/vim-nroff-ftplugin
-" Previous Maintainer: Chris Spiegel <cspiegel@gmail.com>
-" Last Change: 2020 Nov 21
+" Previous Maintainer: Chris Spiegel <cspiegel@gmail.com>
+" 2024 May 24 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
-setlocal commentstring=.\\\"%s
+setlocal commentstring=.\\\"\ %s
setlocal comments=:.\\\"
setlocal sections+=Sh
diff --git a/runtime/ftplugin/obse.vim b/runtime/ftplugin/obse.vim
index 6d865f0..bf5076f 100644
--- a/runtime/ftplugin/obse.vim
+++ b/runtime/ftplugin/obse.vim
@@ -2,8 +2,9 @@
" Language: Oblivion Language (obl)
" Original Creator: Kat <katisntgood@gmail.com>
" Maintainer: Kat <katisntgood@gmail.com>
-" Created: August 08, 2021
-" Last Change: 13 November 2022
+" Created: 2021 Aug 08
+" Last Change: 2022 Nov 13
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin")
finish
@@ -20,7 +21,7 @@ noremap <script> <buffer> <silent> ]] <nop>
noremap <script> <buffer> <silent> [] <nop>
noremap <script> <buffer> <silent> ][ <nop>
-setlocal commentstring=;%s
+setlocal commentstring=;\ %s
setlocal comments=:;
function s:NextSection(type, backwards, visual)
diff --git a/runtime/ftplugin/ocaml.vim b/runtime/ftplugin/ocaml.vim
index 20172c9..8b88d8d 100644
--- a/runtime/ftplugin/ocaml.vim
+++ b/runtime/ftplugin/ocaml.vim
@@ -5,12 +5,14 @@
" Pierre Vittet <pierre-vittet@pvittet.com>
" Stefano Zacchiroli <zack@bononia.it>
" Vincent Aravantinos <firstname.name@imag.fr>
+" Riley Bruins <ribru17@gmail.com> ('commentstring')
" URL: https://github.com/ocaml/vim-ocaml
" Last Change:
" 2013 Oct 27 - Added commentstring (MM)
" 2013 Jul 26 - load default compiler settings (MM)
" 2013 Jul 24 - removed superfluous efm-setting (MM)
" 2013 Jul 22 - applied fixes supplied by Hirotaka Hamada (MM)
+" 2024 May 23 - added space in commentstring (RB)
if exists("b:did_ftplugin")
finish
@@ -40,7 +42,7 @@ set cpo&vim
" Comment string
setlocal comments=sr:(*\ ,mb:\ ,ex:*)
setlocal comments^=sr:(**,mb:\ \ ,ex:*)
-setlocal commentstring=(*%s*)
+setlocal commentstring=(*\ %s\ *)
" Add mappings, unless the user didn't want this.
if !exists("no_plugin_maps") && !exists("no_ocaml_maps")
diff --git a/runtime/ftplugin/odin.vim b/runtime/ftplugin/odin.vim
index 9d94a57..c0ad262 100644
--- a/runtime/ftplugin/odin.vim
+++ b/runtime/ftplugin/odin.vim
@@ -1,10 +1,11 @@
vim9script
# Vim filetype plugin file
-# Language: Odin
-# Maintainer: Maxim Kim <habamax@gmail.com>
-# Website: https://github.com/habamax/vim-odin
-# Last Change: 2024-01-15
+# Language: Odin
+# Maintainer: Maxim Kim <habamax@gmail.com>
+# Website: https://github.com/habamax/vim-odin
+# Last Change: 2024 Jan 15
+# 2024-May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin")
finish
@@ -16,5 +17,5 @@ b:undo_ftplugin = 'setlocal commentstring<'
\ .. '| setlocal suffixesadd<'
setlocal suffixesadd=.odin
-setlocal commentstring=//%s
+setlocal commentstring=//\ %s
setlocal comments=s1:/*,mb:*,ex:*/,://
diff --git a/runtime/ftplugin/openvpn.vim b/runtime/ftplugin/openvpn.vim
index 56c0f25..9cd7b7a 100644
--- a/runtime/ftplugin/openvpn.vim
+++ b/runtime/ftplugin/openvpn.vim
@@ -2,6 +2,7 @@
" Language: OpenVPN
" Maintainer: ObserverOfTime <chronobserver@disroot.org>
" Last Change: 2022 Oct 16
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists('b:did_ftplugin')
finish
@@ -9,6 +10,6 @@ endif
let b:did_ftplugin = 1
setlocal iskeyword+=-,.,/
-setlocal comments=:#,:; commentstring=#%s
+setlocal comments=:#,:; commentstring=#\ %s
let b:undo_ftplugin = 'setl isk< com< cms<'
diff --git a/runtime/ftplugin/pascal.vim b/runtime/ftplugin/pascal.vim
index 9abd7dd..7c800c4 100644
--- a/runtime/ftplugin/pascal.vim
+++ b/runtime/ftplugin/pascal.vim
@@ -3,6 +3,7 @@
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Dan Sharp
" Last Change: 2024 Jan 14
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
@@ -11,7 +12,7 @@ let s:cpo_save = &cpo
set cpo&vim
set comments=s:(*,m:\ ,e:*),s:{,m:\ ,e:}
-set commentstring={%s}
+set commentstring={\ %s\ }
if exists("pascal_delphi")
set comments+=:///
diff --git a/runtime/ftplugin/pdf.vim b/runtime/ftplugin/pdf.vim
index 1ed9911..96c77c8 100644
--- a/runtime/ftplugin/pdf.vim
+++ b/runtime/ftplugin/pdf.vim
@@ -2,13 +2,14 @@
" Language: PDF
" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
" Last Change: 2007 Dec 16
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
-setlocal commentstring=%%s
+setlocal commentstring=%\ %s
setlocal comments=:%
let b:undo_ftplugin = "setlocal cms< com< | unlet! b:match_words"
diff --git a/runtime/ftplugin/perl.vim b/runtime/ftplugin/perl.vim
index 8c6a80e..03368a7 100644
--- a/runtime/ftplugin/perl.vim
+++ b/runtime/ftplugin/perl.vim
@@ -8,6 +8,7 @@
" 2023 Sep 07 by Vim Project (safety check: don't execute perl
" from current directory)
" 2024 Jan 14 by Vim Project (browsefilter)
+" 2024 May 24 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
@@ -22,7 +23,7 @@ setlocal formatoptions+=crqol
setlocal keywordprg=perldoc\ -f
setlocal comments=:#
-setlocal commentstring=#%s
+setlocal commentstring=#\ %s
" Provided by Ned Konz <ned at bike-nomad dot com>
"---------------------------------------------
diff --git a/runtime/ftplugin/php.vim b/runtime/ftplugin/php.vim
index f03f145..e124961 100644
--- a/runtime/ftplugin/php.vim
+++ b/runtime/ftplugin/php.vim
@@ -3,6 +3,7 @@
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Dan Sharp
" Last Change: 2024 Jan 14
+" Last Change: 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin")
finish
@@ -44,7 +45,7 @@ if exists("b:match_skip")
endif
setlocal comments=s1:/*,mb:*,ex:*/,://,:#
-setlocal commentstring=/*%s*/
+setlocal commentstring=/*\ %s\ */
setlocal formatoptions+=l formatoptions-=t
if get(g:, "php_autocomment", 1)
diff --git a/runtime/ftplugin/prisma.vim b/runtime/ftplugin/prisma.vim
new file mode 100644
index 0000000..8b733da
--- /dev/null
+++ b/runtime/ftplugin/prisma.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin
+" Language: prisma
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 May 19
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setl comments=:///,:// commentstring=//\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/ps1.vim b/runtime/ftplugin/ps1.vim
index d6ab010..9d698f2 100644
--- a/runtime/ftplugin/ps1.vim
+++ b/runtime/ftplugin/ps1.vim
@@ -3,6 +3,7 @@
" URL: https://github.com/PProvost/vim-ps1
" Last Change: 2021 Apr 02
" 2024 Jan 14 by Vim Project (browsefilter)
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin") | finish | endif
@@ -14,7 +15,7 @@ let s:cpo_save = &cpo
set cpo&vim
setlocal tw=0
-setlocal commentstring=#%s
+setlocal commentstring=#\ %s
setlocal formatoptions=tcqro
" Enable autocompletion of hyphenated PowerShell commands,
" e.g. Get-Content or Get-ADUser
diff --git a/runtime/ftplugin/ps1xml.vim b/runtime/ftplugin/ps1xml.vim
index 17bb181..0052de1 100644
--- a/runtime/ftplugin/ps1xml.vim
+++ b/runtime/ftplugin/ps1xml.vim
@@ -3,6 +3,7 @@
" URL: https://github.com/PProvost/vim-ps1
" Last Change: 2021 Apr 02
" 2024 Jan 14 by Vim Project (browsefilter)
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin") | finish | endif
@@ -14,7 +15,7 @@ let s:cpo_save = &cpo
set cpo&vim
setlocal tw=0
-setlocal commentstring=#%s
+setlocal commentstring=#\ %s
setlocal formatoptions=tcqro
" Change the browse dialog on Win32 and GTK to show mainly PowerShell-related files
diff --git a/runtime/ftplugin/purescript.vim b/runtime/ftplugin/purescript.vim
new file mode 100644
index 0000000..b3300bb
--- /dev/null
+++ b/runtime/ftplugin/purescript.vim
@@ -0,0 +1,14 @@
+" Vim filetype plugin
+" Language: purescript
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 May 19
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setl comments=s1f:{-,mb:\ ,ex:-},:--\ \|,:--
+setl commentstring=--\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/python.vim b/runtime/ftplugin/python.vim
index 79acaa6..c000296 100644
--- a/runtime/ftplugin/python.vim
+++ b/runtime/ftplugin/python.vim
@@ -1,10 +1,9 @@
" Vim filetype plugin file
" Language: python
-" Maintainer: Tom Picton <tom@tompicton.co.uk>
+" Maintainer: Tom Picton <tom@tompicton.com>
" Previous Maintainer: James Sully <sullyj3@gmail.com>
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
-" Last Change: Mon, 5 October 2020
-" 2024 Jan 14 by Vim Project (browsefilter)
+" Last Change: 2024/05/13
" https://github.com/tpict/vim-ftplugin-python
if exists("b:did_ftplugin") | finish | endif
@@ -15,7 +14,7 @@ set cpo&vim
setlocal cinkeys-=0#
setlocal indentkeys-=0#
setlocal include=^\\s*\\(from\\\|import\\)
-setlocal define=^\\s*\\(def\\\|class\\)
+setlocal define=^\\s*\\(\\(async\\s\\+\\)\\?def\\\|class\\)
" For imports with leading .., append / and replace additional .s with ../
let b:grandparent_match = '^\(.\.\)\(\.*\)'
@@ -57,14 +56,14 @@ let b:next_end='\v\S\n*(%$\|^(\s*\n*)*(class\|def\|async def)\|^\S)'
let b:prev_end='\v\S\n*(^(\s*\n*)*(class\|def\|async def)\|^\S)'
if !exists('g:no_plugin_maps') && !exists('g:no_python_maps')
- execute "nnoremap <silent> <buffer> ]] :call <SID>Python_jump('n', '". b:next_toplevel."', 'W', v:count1)<cr>"
- execute "nnoremap <silent> <buffer> [[ :call <SID>Python_jump('n', '". b:prev_toplevel."', 'Wb', v:count1)<cr>"
- execute "nnoremap <silent> <buffer> ][ :call <SID>Python_jump('n', '". b:next_endtoplevel."', 'W', v:count1, 0)<cr>"
- execute "nnoremap <silent> <buffer> [] :call <SID>Python_jump('n', '". b:prev_endtoplevel."', 'Wb', v:count1, 0)<cr>"
- execute "nnoremap <silent> <buffer> ]m :call <SID>Python_jump('n', '". b:next."', 'W', v:count1)<cr>"
- execute "nnoremap <silent> <buffer> [m :call <SID>Python_jump('n', '". b:prev."', 'Wb', v:count1)<cr>"
- execute "nnoremap <silent> <buffer> ]M :call <SID>Python_jump('n', '". b:next_end."', 'W', v:count1, 0)<cr>"
- execute "nnoremap <silent> <buffer> [M :call <SID>Python_jump('n', '". b:prev_end."', 'Wb', v:count1, 0)<cr>"
+ execute "nnoremap <silent> <buffer> ]] :<C-U>call <SID>Python_jump('n', '". b:next_toplevel."', 'W', v:count1)<cr>"
+ execute "nnoremap <silent> <buffer> [[ :<C-U>call <SID>Python_jump('n', '". b:prev_toplevel."', 'Wb', v:count1)<cr>"
+ execute "nnoremap <silent> <buffer> ][ :<C-U>call <SID>Python_jump('n', '". b:next_endtoplevel."', 'W', v:count1, 0)<cr>"
+ execute "nnoremap <silent> <buffer> [] :<C-U>call <SID>Python_jump('n', '". b:prev_endtoplevel."', 'Wb', v:count1, 0)<cr>"
+ execute "nnoremap <silent> <buffer> ]m :<C-U>call <SID>Python_jump('n', '". b:next."', 'W', v:count1)<cr>"
+ execute "nnoremap <silent> <buffer> [m :<C-U>call <SID>Python_jump('n', '". b:prev."', 'Wb', v:count1)<cr>"
+ execute "nnoremap <silent> <buffer> ]M :<C-U>call <SID>Python_jump('n', '". b:next_end."', 'W', v:count1, 0)<cr>"
+ execute "nnoremap <silent> <buffer> [M :<C-U>call <SID>Python_jump('n', '". b:prev_end."', 'Wb', v:count1, 0)<cr>"
execute "onoremap <silent> <buffer> ]] :call <SID>Python_jump('o', '". b:next_toplevel."', 'W', v:count1)<cr>"
execute "onoremap <silent> <buffer> [[ :call <SID>Python_jump('o', '". b:prev_toplevel."', 'Wb', v:count1)<cr>"
diff --git a/runtime/ftplugin/qml.vim b/runtime/ftplugin/qml.vim
index aa05c11..53df11c 100644
--- a/runtime/ftplugin/qml.vim
+++ b/runtime/ftplugin/qml.vim
@@ -3,6 +3,7 @@
" Maintainer: Chase Knowlden <haroldknowlden@gmail.com>
" Last Change: 2023 Aug 16
" 2023 Aug 23 by Vim Project (browsefilter)
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists( 'b:did_ftplugin' )
finish
@@ -28,7 +29,7 @@ endif
" Set 'comments' to format dashed lists in comments.
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
-setlocal commentstring=//%s
+setlocal commentstring=//\ %s
setlocal formatoptions-=t
setlocal formatoptions+=croql
diff --git a/runtime/ftplugin/racket.vim b/runtime/ftplugin/racket.vim
index 84f5422..7bfd87d 100644
--- a/runtime/ftplugin/racket.vim
+++ b/runtime/ftplugin/racket.vim
@@ -3,8 +3,7 @@
" Maintainer: D. Ben Knoble <ben.knoble+github@gmail.com>
" Previous Maintainer: Will Langstroth <will@langstroth.com>
" URL: https://github.com/benknoble/vim-racket
-" Last Change: 2022 Aug 29
-" 2024 Jan 14 by Vim Project (browsefilter)
+" Last Change: 2024 May 28
if exists("b:did_ftplugin")
finish
@@ -21,7 +20,7 @@ setlocal iskeyword=@,!,#-',*-:,<-Z,a-z,~,_,94
setlocal comments=:;;;;,:;;;,:;;,:;
setlocal formatoptions+=r
-"setlocal commentstring=;;%s
+"setlocal commentstring=;;\ %s
setlocal commentstring=#\|\ %s\ \|#
setlocal formatprg=raco\ fmt
diff --git a/runtime/ftplugin/raku.vim b/runtime/ftplugin/raku.vim
index 941222b..f57427e 100644
--- a/runtime/ftplugin/raku.vim
+++ b/runtime/ftplugin/raku.vim
@@ -1,10 +1,11 @@
" Vim filetype plugin file
-" Language: Raku
-" Maintainer: vim-perl <vim-perl@googlegroups.com>
-" Homepage: https://github.com/Raku/vim-raku
+" Language: Raku
+" Maintainer: vim-perl <vim-perl@googlegroups.com>
+" Homepage: https://github.com/Raku/vim-raku
" Bugs/requests: https://github.com/Raku/vim-raku/issues
-" Last Change: 2021-04-16
-" Contributors: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
+" Last Change: 2021 Apr 16
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
+" Contributors: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
"
" Based on ftplugin/perl.vim by Dan Sharp <dwsharp at hotmail dot com>
@@ -21,7 +22,7 @@ setlocal formatoptions+=crqol
setlocal keywordprg=p6doc
setlocal comments=:#\|,:#=,:#
-setlocal commentstring=#%s
+setlocal commentstring=#\ %s
" Provided by Ned Konz <ned at bike-nomad dot com>
"---------------------------------------------
diff --git a/runtime/ftplugin/rasi.vim b/runtime/ftplugin/rasi.vim
new file mode 100644
index 0000000..5f8ce86
--- /dev/null
+++ b/runtime/ftplugin/rasi.vim
@@ -0,0 +1,25 @@
+" Vim filetype plugin file
+" Language: RASI
+" Maintainer: Pierrick Guillaume <pierguill@gmail.com>
+" Last Change: 2024 May 21
+
+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< isk< inc<"
+
+setlocal comments=s1:/*,mb:*,ex:*/
+setlocal commentstring=//\ %s
+setlocal iskeyword+=-
+
+let &l:include = '^\s*@import\s\+\%(url(\)\='
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
+" vim: ts=8
diff --git a/runtime/ftplugin/rescript.vim b/runtime/ftplugin/rescript.vim
new file mode 100644
index 0000000..dd94c68
--- /dev/null
+++ b/runtime/ftplugin/rescript.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin
+" Language: rescript
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 May 21
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setl comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// commentstring=//\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/rust.vim b/runtime/ftplugin/rust.vim
index fb15b44..c2bcdd3 100644
--- a/runtime/ftplugin/rust.vim
+++ b/runtime/ftplugin/rust.vim
@@ -1,7 +1,8 @@
-" Language: Rust
-" Description: Vim ftplugin for Rust
-" Maintainer: Chris Morgan <me@chrismorgan.info>
-" Last Change: 2024-03-17
+" Language: Rust
+" Description: Vim ftplugin for Rust
+" Maintainer: Chris Morgan <me@chrismorgan.info>
+" Last Change: 2024 Mar 17
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com ('commentstring')
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
if exists("b:did_ftplugin")
@@ -36,7 +37,7 @@ if get(g:, 'rust_bang_comment_leader', 0)
else
setlocal comments=s0:/*!,ex:*/,s1:/*,mb:*,ex:*/,:///,://!,://
endif
-setlocal commentstring=//%s
+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
diff --git a/runtime/ftplugin/scdoc.vim b/runtime/ftplugin/scdoc.vim
index 552c865..8225e43 100644
--- a/runtime/ftplugin/scdoc.vim
+++ b/runtime/ftplugin/scdoc.vim
@@ -1,7 +1,8 @@
" scdoc filetype plugin
-" Maintainer: Gregory Anders <contact@gpanders.com>
-" Last Updated: 2022-05-09
-" Upstream: https://github.com/gpanders/vim-scdoc
+" Maintainer: Gregory Anders <contact@gpanders.com>
+" Last Updated: 2022 May 09
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
+" Upstream: https://github.com/gpanders/vim-scdoc
" Only do this when not done yet for this buffer
if exists('b:did_ftplugin')
@@ -12,7 +13,7 @@ endif
let b:did_ftplugin = 1
setlocal comments=b:;
-setlocal commentstring=;%s
+setlocal commentstring=;\ %s
setlocal formatoptions+=t
setlocal noexpandtab
setlocal shiftwidth=0
diff --git a/runtime/ftplugin/scheme.vim b/runtime/ftplugin/scheme.vim
index 04655bc..03f625b 100644
--- a/runtime/ftplugin/scheme.vim
+++ b/runtime/ftplugin/scheme.vim
@@ -1,11 +1,12 @@
" Vim filetype plugin file
-" Language: Scheme (R7RS)
-" Last Change: 2019-11-19
-" Author: Evan Hanson <evhan@foldling.org>
-" Maintainer: Evan Hanson <evhan@foldling.org>
+" Language: Scheme (R7RS)
+" Last Change: 2019 Nov 19
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
+" Author: Evan Hanson <evhan@foldling.org>
+" Maintainer: Evan Hanson <evhan@foldling.org>
" Previous Maintainer: Sergey Khorev <sergey.khorev@gmail.com>
-" Repository: https://git.foldling.org/vim-scheme.git
-" URL: https://foldling.org/vim/ftplugin/scheme.vim
+" Repository: https://git.foldling.org/vim-scheme.git
+" URL: https://foldling.org/vim/ftplugin/scheme.vim
if exists('b:did_ftplugin')
finish
@@ -16,7 +17,7 @@ set cpo&vim
setl lisp
setl comments=:;;;;,:;;;,:;;,:;,sr:#\|,mb:\|,ex:\|#
-setl commentstring=;%s
+setl commentstring=;\ %s
setl define=^\\s*(def\\k*
setl iskeyword=33,35-39,42-43,45-58,60-90,94,95,97-122,126
diff --git a/runtime/ftplugin/sh.vim b/runtime/ftplugin/sh.vim
index 6d2093b..c47aa52 100644
--- a/runtime/ftplugin/sh.vim
+++ b/runtime/ftplugin/sh.vim
@@ -4,7 +4,7 @@
" Previous Maintainer: Dan Sharp
" Contributor: Enno Nagel <ennonagel+vim@gmail.com>
" Eisuke Kawashima
-" Last Change: 2024 Feb 27
+" Last Change: 2024 May 06 by Vim Project (MANPAGER=)
if exists("b:did_ftplugin")
finish
@@ -46,11 +46,11 @@ endif
if get(b:, "is_bash", 0)
if !has("gui_running") && executable("less")
- command! -buffer -nargs=1 ShKeywordPrg silent exe '!bash -c "{ help "<args>" 2>/dev/null || man "<args>"; } | LESS= less"' | redraw!
+ command! -buffer -nargs=1 ShKeywordPrg silent exe '!bash -c "{ help "<args>" 2>/dev/null || MANPAGER= man "<args>"; } | LESS= less"' | redraw!
elseif has("terminal")
command! -buffer -nargs=1 ShKeywordPrg silent exe ':term bash -c "help "<args>" 2>/dev/null || man "<args>""'
else
- command! -buffer -nargs=1 ShKeywordPrg echo system('bash -c "help <args>" 2>/dev/null || man "<args>"')
+ command! -buffer -nargs=1 ShKeywordPrg echo system('bash -c "help <args>" 2>/dev/null || MANPAGER= man "<args>"')
endif
setlocal keywordprg=:ShKeywordPrg
let b:undo_ftplugin ..= " | setl kp< | sil! delc -buffer ShKeywordPrg"
diff --git a/runtime/ftplugin/slint.vim b/runtime/ftplugin/slint.vim
new file mode 100644
index 0000000..ac8057f
--- /dev/null
+++ b/runtime/ftplugin/slint.vim
@@ -0,0 +1,15 @@
+" Vim filetype plugin
+" Language: slint
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 May 19
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+" Set 'comments' to format dashed lists in comments.
+" Also include ///, used for Doxygen.
+setl comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// commentstring=//\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/snakemake.vim b/runtime/ftplugin/snakemake.vim
new file mode 100644
index 0000000..ab90ca1
--- /dev/null
+++ b/runtime/ftplugin/snakemake.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin
+" Language: snakemake
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 Jun 13
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setl comments=:# commentstring=#\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/sql.vim b/runtime/ftplugin/sql.vim
index c85232f..61b7e67 100644
--- a/runtime/ftplugin/sql.vim
+++ b/runtime/ftplugin/sql.vim
@@ -4,6 +4,7 @@
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Last Change: 2017 Mar 07
" 2024 Jan 14 by Vim Project (browsefilter)
+" 2024 May 18 by Vim Project (set comment options)
" Download: http://vim.sourceforge.net/script.php?script_id=454
" For more details please use:
@@ -105,6 +106,8 @@ set cpo&vim
setlocal formatoptions-=t
setlocal formatoptions+=c
+setlocal comments=:-- commentstring=--\ %s
+
" Functions/Commands to allow the user to change SQL syntax dialects
" through the use of :SQLSetType <tab> for completion.
" This works with both Vim 6 and 7.
@@ -266,7 +269,7 @@ if exists("b:did_ftplugin") && exists("b:current_ftplugin") && b:current_ftplugi
finish
endif
-let b:undo_ftplugin = "setl comments< formatoptions< define< omnifunc<" .
+let b:undo_ftplugin = "setl comments< commentstring< formatoptions< define< omnifunc<" .
\ " | unlet! b:browsefilter b:match_words"
" Don't load another plugin for this buffer
diff --git a/runtime/ftplugin/sshdconfig.vim b/runtime/ftplugin/sshdconfig.vim
new file mode 100644
index 0000000..3d39454
--- /dev/null
+++ b/runtime/ftplugin/sshdconfig.vim
@@ -0,0 +1,10 @@
+" Vim filetype plugin file
+" Language: OpenSSH server configuration file
+" Maintainer: Yinzuo Jiang <jiangyinzuo@foxmail.com>
+" Latest Revision: 2024-05-17
+
+if exists("b:did_ftplugin")
+ finish
+endif
+
+runtime! ftplugin/conf.vim
diff --git a/runtime/ftplugin/stylus.vim b/runtime/ftplugin/stylus.vim
new file mode 100644
index 0000000..1c5f14e
--- /dev/null
+++ b/runtime/ftplugin/stylus.vim
@@ -0,0 +1,54 @@
+" Vim filetype plugin
+" Language: Stylus
+" Maintainer: Marc Harter
+" Credits: Tim Pope
+
+" Only do this when not done yet for this buffer
+if exists("b:did_ftplugin")
+ finish
+endif
+
+let s:save_cpo = &cpo
+set cpo-=C
+
+" Define some defaults in case the included ftplugins don't set them.
+let s:undo_ftplugin = ""
+let s:browsefilter = "All Files (*.*)\t*.*\n"
+
+runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
+unlet! b:did_ftplugin
+
+" Override our defaults if these were set by an included ftplugin.
+if exists("b:undo_ftplugin")
+ let s:undo_ftplugin = b:undo_ftplugin
+ unlet b:undo_ftplugin
+endif
+if exists("b:browsefilter")
+ let s:browsefilter = b:browsefilter
+ unlet b:browsefilter
+endif
+
+" Change the browse dialog on Win32 to show mainly Styl-related files
+if has("gui_win32")
+ let b:browsefilter="Stylus Files (*.styl)\t*.styl\n" . s:browsefilter
+endif
+
+setlocal comments= commentstring=//\ %s
+setlocal suffixesadd=.styl
+setlocal formatoptions+=r
+
+" Add '-' and '#' to the what makes up a keyword.
+" This means that 'e' and 'w' work properly now, for properties
+" and valid variable names.
+setl iskeyword+=#,-
+
+" Add a Stylus command (to see if it's valid)
+command -buffer Stylus !clear; cat % |stylus
+
+
+let b:undo_ftplugin = "setl sua< isk< cms< com< fo< "
+ \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
+
+let &cpo = s:save_cpo
+
+" vim:set sw=2:
diff --git a/runtime/ftplugin/svelte.vim b/runtime/ftplugin/svelte.vim
new file mode 100644
index 0000000..e0ec4e0
--- /dev/null
+++ b/runtime/ftplugin/svelte.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin
+" Language: svelte
+" Maintainer: Igor Lacerda <igorlafarsi@gmail.com>
+" Last Change: 2024 Jun 09
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setl commentstring=<!--\ %s\ -->
+
+let b:undo_ftplugin = 'setl cms<'
diff --git a/runtime/ftplugin/tcl.vim b/runtime/ftplugin/tcl.vim
index fa90009..214d9c2 100644
--- a/runtime/ftplugin/tcl.vim
+++ b/runtime/ftplugin/tcl.vim
@@ -3,6 +3,7 @@
" Maintainer: Robert L Hicks <sigzero@gmail.com>
" Latest Revision: 2009-05-01
" 2024 Jan 14 by Vim Project (browsefilter)
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin")
finish
@@ -15,7 +16,7 @@ let s:cpo_save = &cpo
set cpo-=C
setlocal comments=:#
-setlocal commentstring=#%s
+setlocal commentstring=#\ %s
setlocal formatoptions+=croql
" Change the browse dialog on Windows to show mainly Tcl-related files
diff --git a/runtime/ftplugin/typescript.vim b/runtime/ftplugin/typescript.vim
index 680521d..fb5f4e1 100644
--- a/runtime/ftplugin/typescript.vim
+++ b/runtime/ftplugin/typescript.vim
@@ -2,6 +2,7 @@
" Language: TypeScript
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2024 Jan 14
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin")
finish
@@ -18,7 +19,7 @@ setlocal formatoptions-=t formatoptions+=croql
" Set 'comments' to format dashed lists in comments.
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
-setlocal commentstring=//%s
+setlocal commentstring=//\ %s
setlocal suffixesadd+=.ts,.d.ts,.tsx,.js,.jsx,.cjs,.mjs
diff --git a/runtime/ftplugin/typst.vim b/runtime/ftplugin/typst.vim
new file mode 100644
index 0000000..c2d7811
--- /dev/null
+++ b/runtime/ftplugin/typst.vim
@@ -0,0 +1,14 @@
+" Vim filetype plugin
+" Language: typst
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 May 19
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
+setlocal commentstring=//\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/v.vim b/runtime/ftplugin/v.vim
new file mode 100644
index 0000000..4d4f60d
--- /dev/null
+++ b/runtime/ftplugin/v.vim
@@ -0,0 +1,15 @@
+" Vim filetype plugin
+" Language: v
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 May 19
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+" Set 'comments' to format dashed lists in comments.
+" Also include ///, used for Doxygen.
+setl comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// commentstring=//\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/verilog.vim b/runtime/ftplugin/verilog.vim
index 83c3754..c20be25 100644
--- a/runtime/ftplugin/verilog.vim
+++ b/runtime/ftplugin/verilog.vim
@@ -3,6 +3,7 @@
" Maintainer: Chih-Tsun Huang <cthuang@cs.nthu.edu.tw>
" Last Change: 2017 Aug 25 by Chih-Tsun Huang
" 2024 Jan 14 by Vim Project (browsefilter)
+" 2024 May 20 by Riley Bruins <ribru17@gmail.com> (commentstring)
" URL: http://www.cs.nthu.edu.tw/~cthuang/vim/ftplugin/verilog.vim
"
" Credits:
@@ -22,7 +23,7 @@ let s:cpo_save = &cpo
set cpo&vim
" Undo the plugin effect
-let b:undo_ftplugin = "setlocal fo< com< tw<"
+let b:undo_ftplugin = "setlocal fo< com< tw< cms<"
\ . "| unlet! b:browsefilter b:match_ignorecase b:match_words"
" Set 'formatoptions' to break comment lines but not other lines,
@@ -31,6 +32,7 @@ setlocal fo-=t fo+=croqlm1
" Set 'comments' to format dashed lists in comments.
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
+setlocal commentstring=//\ %s
" Format comments to be up to 78 characters long
if &textwidth == 0
diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim
index 67f360b..11c05d1 100644
--- a/runtime/ftplugin/vim.vim
+++ b/runtime/ftplugin/vim.vim
@@ -2,6 +2,7 @@
" Language: Vim
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2024 Apr 13
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only do this when not done yet for this buffer
@@ -51,7 +52,7 @@ setlocal keywordprg=:help
" Comments starts with # in Vim9 script. We have to guess which one to use.
if "\n" .. getline(1, 32)->join("\n") =~# '\n\s*vim9\%[script]\>'
- setlocal commentstring=#%s
+ setlocal commentstring=#\ %s
else
setlocal commentstring=\"%s
endif
diff --git a/runtime/ftplugin/wat.vim b/runtime/ftplugin/wat.vim
index 35d2d6a..ad1140b 100644
--- a/runtime/ftplugin/wat.vim
+++ b/runtime/ftplugin/wat.vim
@@ -2,6 +2,7 @@
" Language: WebAssembly
" Maintainer: rhysd <lin90162@yahoo.co.jp>
" Last Change: Nov 14, 2023
+" May 24, 2024 by Riley Bruins <ribru17@gmail.com> ('commentstring')
" For bugs, patches and license go to https://github.com/rhysd/vim-wasm
if exists("b:did_ftplugin")
@@ -10,7 +11,7 @@ endif
let b:did_ftplugin = 1
setlocal comments=s:(;,e:;),:;;
-setlocal commentstring=(;%s;)
+setlocal commentstring=(;\ %s\ ;)
setlocal formatoptions-=t
setlocal iskeyword+=$,.,/
diff --git a/runtime/ftplugin/xdefaults.vim b/runtime/ftplugin/xdefaults.vim
index c1aff70..26c7516 100644
--- a/runtime/ftplugin/xdefaults.vim
+++ b/runtime/ftplugin/xdefaults.vim
@@ -1,7 +1,8 @@
" Vim filetype plugin file
-" Language: X resources files like ~/.Xdefaults (xrdb)
-" Previous 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 Jul 09
+" 2024 Jun 03 by Riley Bruins <ribru17@gmail.com> ('commentstring')
if exists("b:did_ftplugin")
finish
@@ -13,7 +14,7 @@ set cpo&vim
let b:undo_ftplugin = "setl com< cms< inc< fo<"
-setlocal comments=s1:/*,mb:*,ex:*/,:! commentstring& inc&
+setlocal comments=s1:/*,mb:*,ex:*/,:! commentstring=!\ %s inc&
setlocal formatoptions-=t formatoptions+=croql
let &cpo = s:cpo_save
diff --git a/runtime/ftplugin/xml.vim b/runtime/ftplugin/xml.vim
index b81c398..83c528e 100644
--- a/runtime/ftplugin/xml.vim
+++ b/runtime/ftplugin/xml.vim
@@ -3,6 +3,7 @@
" Maintainer: Christian Brabandt <cb@256bit.org>
" Last Changed: Dec 07th, 2018
" 2024 Jan 14 by Vim Project (browsefilter)
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
" Previous Maintainer: Dan Sharp
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
@@ -15,7 +16,7 @@ let b:did_ftplugin = 1
let s:save_cpo = &cpo
set cpo&vim
-setlocal commentstring=<!--%s-->
+setlocal commentstring=<!--\ %s\ -->
" Remove the middlepart from the comments section, as this causes problems:
" https://groups.google.com/d/msg/vim_dev/x4GT-nqa0Kg/jvtRnEbtAnMJ
setlocal comments=s:<!--,e:-->
diff --git a/runtime/ftplugin/zig.vim b/runtime/ftplugin/zig.vim
index 28b8cd5..ea229b6 100644
--- a/runtime/ftplugin/zig.vim
+++ b/runtime/ftplugin/zig.vim
@@ -1,68 +1,52 @@
" Vim filetype plugin file
-" Language: Zig
-" Upstream: https://github.com/ziglang/zig.vim
+" Language: Zig
+" Maintainer: Mathias Lindgren <math.lindgren@gmail.com>
+" Last Change: 2024 May 21
+" Based on: https://github.com/ziglang/zig.vim
-" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
-let s:cpo_orig = &cpo
+let s:cpo_save = &cpo
set cpo&vim
compiler zig_build
" Match Zig builtin fns
setlocal iskeyword+=@-@
-
-" Recommended code style, no tabs and 4-space indentation
-setlocal expandtab
-setlocal tabstop=8
-setlocal softtabstop=4
-setlocal shiftwidth=4
-
setlocal formatoptions-=t formatoptions+=croql
-
-setlocal suffixesadd=.zig,.zir
+setlocal suffixesadd=.zig,.zir,.zon
+let &l:define='\v(<fn>|<const>|<var>|^\s*\#\s*define)'
+let b:undo_ftplugin = 'setl isk< fo< sua< mp< def<'
+
+if get(g:, 'zig_recommended_style', 1)
+ setlocal expandtab
+ setlocal tabstop=8
+ setlocal softtabstop=4
+ setlocal shiftwidth=4
+ let b:undo_ftplugin .= ' | setl et< ts< sts< sw<'
+endif
if has('comments')
setlocal comments=:///,://!,://
setlocal commentstring=//\ %s
+ let b:undo_ftplugin .= ' | setl com< cms<'
endif
if has('find_in_path')
let &l:includeexpr='substitute(v:fname, "^([^.])$", "\1.zig", "")'
let &l:include='\v(\@import>|\@cInclude>|^\s*\#\s*include)'
-endif
-
-let &l:define='\v(<fn>|<const>|<var>|^\s*\#\s*define)'
-
-" Safety check: don't execute zig from current directory
-if !exists('g:zig_std_dir') && exists('*json_decode') &&
- \ executable('zig') && dist#vim#IsSafeExecutable('zig', 'zig')
- silent let s:env = system('zig env')
- if v:shell_error == 0
- let g:zig_std_dir = json_decode(s:env)['std_dir']
- endif
- unlet! s:env
+ let b:undo_ftplugin .= ' | setl inex< inc<'
endif
if exists('g:zig_std_dir')
- let &l:path = g:zig_std_dir . ',' . &l:path
+ let &l:path .= ',' . g:zig_std_dir
+ let b:undo_ftplugin .= ' | setl pa<'
endif
-let b:undo_ftplugin =
- \ 'setl isk< et< ts< sts< sw< fo< sua< mp< com< cms< inex< inc< pa<'
-
-augroup vim-zig
- autocmd! * <buffer>
- autocmd BufWritePre <buffer> if get(g:, 'zig_fmt_autosave', 1) | call zig#fmt#Format() | endif
-augroup END
-
-let b:undo_ftplugin .= '|au! vim-zig * <buffer>'
-
-let &cpo = s:cpo_orig
-unlet s:cpo_orig
+let &cpo = s:cpo_save
+unlet s:cpo_save
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab
diff --git a/runtime/ftplugin/zsh.vim b/runtime/ftplugin/zsh.vim
index 40986fc..aee8900 100644
--- a/runtime/ftplugin/zsh.vim
+++ b/runtime/ftplugin/zsh.vim
@@ -2,7 +2,7 @@
" Language: Zsh shell script
" Maintainer: Christian Brabandt <cb@256bit.org>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2023-10-07
+" Latest Revision: 2024 May 06 by Vim Project (MANPAGER=)
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-zsh
@@ -24,7 +24,7 @@ if executable('zsh') && &shell !~# '/\%(nologin\|false\)$'
elseif has('terminal')
command! -buffer -nargs=1 ZshKeywordPrg silent exe ':term zsh -c "autoload -Uz run-help; run-help <args>"'
else
- command! -buffer -nargs=1 ZshKeywordPrg echo system('zsh -c "autoload -Uz run-help; run-help <args> 2>/dev/null"')
+ command! -buffer -nargs=1 ZshKeywordPrg echo system('MANPAGER= zsh -c "autoload -Uz run-help; run-help <args> 2>/dev/null"')
endif
if !exists('current_compiler')
compiler zsh