]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(postscr): set commentstring option in ftplugin
authorRiley Bruins <ribru17@hotmail.com>
Mon, 9 Jun 2025 19:08:33 +0000 (21:08 +0200)
committerChristian Brabandt <cb@256bit.org>
Mon, 9 Jun 2025 19:08:33 +0000 (21:08 +0200)
closes: #17486

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/ftplugin/postscr.vim

index b4c5e06324ca7b58cbf2073f04ff0fb1555d3e51..eb53b38f09d6d51c3622ddbc84bd6b2c6831c37b 100644 (file)
@@ -3,6 +3,7 @@
 " Maintainer:  Mike Williams <mrw@eandem.co.uk>
 " Last Change: 24th April 2012
 "              2024 Jan 14 by Vim Project (browsefilter)
+"              2025 Jun 08 by Riley Bruins <ribru17@gmail.com> ('commentstring')
 
 " Only do this when not done yet for this buffer
 if exists("b:did_ftplugin")
@@ -17,6 +18,7 @@ set cpo&vim
 
 " PS comment formatting
 setlocal comments=b:%
+setlocal commentstring=%\ %s
 setlocal formatoptions-=t formatoptions+=rol
 
 " Define patterns for the matchit macro
@@ -36,7 +38,7 @@ if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
   endif
 endif
 
-let b:undo_ftplugin = "setlocal comments< formatoptions<"
+let b:undo_ftplugin = "setlocal comments< commentstring< formatoptions<"
     \ . "| unlet! b:browsefilter b:match_ignorecase b:match_words"
 
 let &cpo = s:cpo_save