commit fa648731ec8c4811aa5f931343850f0207fdb49a
parent 694f6345565efb239a5b9a2e130da303b1f57ebc
Author: Christian Clason <c.clason@uni-graz.at>
Date: Tue, 15 Jul 2025 22:45:40 +0200
vim-patch:9a667b4: runtime(swig): add 'comments', 'commentstring' in filetype plugin
Reference:
https://www.swig.org/Doc1.3/SWIG.html#SWIG_nn5
closes: vim/vim#17753
https://github.com/vim/vim/commit/9a667b4dba09aee7968f33686afcac99dab347df
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/runtime/ftplugin/swig.vim b/runtime/ftplugin/swig.vim
@@ -2,6 +2,7 @@
" Language: SWIG
" Maintainer: Julien Marrec <julien.marrec 'at' gmail com>
" Last Change: 2023 November 23
+" 2025 July 14 by Vim project: set 'comment'/'commentstring' options
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -9,5 +10,7 @@ if exists("b:did_ftplugin")
endif
let b:did_ftplugin = 1
-let b:undo_ftplugin = "setlocal iskeyword<"
+let b:undo_ftplugin = "setlocal iskeyword< comments< commentstring<"
setlocal iskeyword+=%
+setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
+setlocal commentstring=//\ %s