aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-10-07 22:10:19 +0200
committerChristian Clason <c.clason@uni-graz.at>2024-10-08 08:21:35 +0200
commit7de8bdaeb8792dd7a2c6f57a2181d72a95707ef0 (patch)
tree1f0e52f71c62db40870c5b29985be0c0d78ab3e1
parentf659699a26999cba4947f3c335c6e48d05c95310 (diff)
downloadrneovim-7de8bdaeb8792dd7a2c6f57a2181d72a95707ef0.tar.gz
rneovim-7de8bdaeb8792dd7a2c6f57a2181d72a95707ef0.tar.bz2
rneovim-7de8bdaeb8792dd7a2c6f57a2181d72a95707ef0.zip
vim-patch:4f51f3a: runtime(spec): set comments and commentstring options
closes: vim/vim#15817 https://github.com/vim/vim/commit/4f51f3a5732725a25ff64f509506c9c81b1c96a5 Co-authored-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--runtime/ftplugin/spec.vim8
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/ftplugin/spec.vim b/runtime/ftplugin/spec.vim
index fa125be52c..dcf2908911 100644
--- a/runtime/ftplugin/spec.vim
+++ b/runtime/ftplugin/spec.vim
@@ -5,6 +5,7 @@
" Last Change: 2015 Jun 01
" Update by Zdenek Dohnal, 2022 May 17
" 2024 Sep 10 by Vim Project: add epoch support for spec changelog, #15537
+" 2024 Oct 07 by Vim Project: add comment support, #15817
if exists("b:did_ftplugin")
finish
@@ -14,6 +15,11 @@ let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
+setlocal comments=b:#
+setlocal commentstring=#\ %s
+
+let b:undo_ftplugin = "setlocal comments< commentstring<"
+
if !exists("no_plugin_maps") && !exists("no_spec_maps")
if !hasmapto("<Plug>SpecChangelog")
map <buffer> <LocalLeader>c <Plug>SpecChangelog
@@ -216,4 +222,4 @@ let b:match_words =
let &cpo = s:cpo_save
unlet s:cpo_save
-let b:undo_ftplugin = "unlet! b:match_ignorecase b:match_words"
+let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words"