]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(ftplugin): set different formatoptions for bpftrace
authorStanislaw Gruszka <stf_xl@wp.pl>
Tue, 23 Dec 2025 20:15:14 +0000 (20:15 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 23 Dec 2025 20:15:14 +0000 (20:15 +0000)
Problem:   Comment formatting does not work by default for bpftrace.
Solution:  Change default 'formatoptions' similarly as C and many other
           languages.

closes: #18996

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/ftplugin/bpftrace.vim

index b9ad1d13c1a1eb6f534297bbf3c9da95c6760a16..73772b103da7f947b7c5e919b0f915f828e7765f 100644 (file)
@@ -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<"