runtime(occam): set commentstring option in ftplugin
Commit:
https://github.com/vim/vim/commit/de535cfe77bf56c5f21acebfacbca2ea240cf190
Author: Riley Bruins <[email protected]>
Date: Mon Jun 9 21:06:23 2025 +0200
runtime(occam): set commentstring option in ftplugin
closes: https://github.com/vim/vim/issues/17485
Signed-off-by: Riley Bruins <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/ftplugin/occam.vim b/runtime/ftplugin/occam.vim
index 0eb510f76..1404c0ea3 100644
--- a/runtime/ftplugin/occam.vim
+++ b/runtime/ftplugin/occam.vim
@@ -3,7 +3,8 @@
" Copyright: Christian Jacobsen <[email protected]>, Mario Schweigler
<[email protected]>
" Maintainer: Mario Schweigler <[email protected]>
" Last Change: 23 April 2003
-" 2024 Jan 14 by Vim Project (browsefilter)
+" 2024 Jan 14 by Vim Project (browsefilter)
+" 2025 Jun 08 by Riley Bruins <[email protected]> ('commentstring')
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -26,6 +27,7 @@ setlocal expandtab
" Break comment lines and insert comment leader in this case
setlocal formatoptions-=t formatoptions+=cql
setlocal comments+=:--
+setlocal commentstring=--\ %s
" Maximum length of comments is 78
setlocal textwidth=78
"}}}
@@ -46,7 +48,7 @@ endif
"{{{ Undo settings
let b:undo_ftplugin = "setlocal shiftwidth< softtabstop< expandtab<"
- \ . " formatoptions< comments< textwidth<"
+ \ . " formatoptions< comments< commentstring< textwidth<"
\ . "| unlet! b:browsefilter"
"}}}
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1uOhxX-009tcq-EU%40256bit.org.