commit dfcf03b1baf801460a35f40168889de67822f81f
parent 1aa26f5d55550dd12c2cfd0f74618f0dcd6467ec
Author: zeertzjq <zeertzjq@outlook.com>
Date: Wed, 24 Dec 2025 08:44:47 +0800
vim-patch:5e577c7: runtime(ftplugin): set different formatoptions for bpftrace
Problem: Comment formatting does not work by default for bpftrace.
Solution: Change default 'formatoptions' similarly as C and many other
languages.
closes: vim/vim#18996
https://github.com/vim/vim/commit/5e577c7aa8be05281da54e9377fc0ac4b7280a2b
Co-authored-by: Stanislaw Gruszka <stf_xl@wp.pl>
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/runtime/ftplugin/bpftrace.vim b/runtime/ftplugin/bpftrace.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: bpftrace
" Maintainer: Stanislaw Gruszka <stf_xl@wp.pl>
-" Last Change: 2025 Dec 05
+" Last Change: 2025 Dec 23
if exists('b:did_ftplugin')
finish
@@ -11,4 +11,6 @@ let b:did_ftplugin = 1
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
setlocal commentstring=//\ %s
-let b:undo_ftplugin = "setlocal comments< commentstring<"
+setlocal formatoptions-=t formatoptions+=croql
+
+let b:undo_ftplugin = "setlocal comments< commentstring< formatoptions<"