Skip to content

Commit 5e577c7

Browse files
sgruszkachrisbra
authored andcommitted
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: #18996 Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent bb10f71 commit 5e577c7

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

runtime/ftplugin/bpftrace.vim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim filetype plugin
22
" Language: bpftrace
33
" Maintainer: Stanislaw Gruszka <stf_xl@wp.pl>
4-
" Last Change: 2025 Dec 05
4+
" Last Change: 2025 Dec 23
55

66
if exists('b:did_ftplugin')
77
finish
@@ -11,4 +11,6 @@ let b:did_ftplugin = 1
1111
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
1212
setlocal commentstring=//\ %s
1313

14-
let b:undo_ftplugin = "setlocal comments< commentstring<"
14+
setlocal formatoptions-=t formatoptions+=croql
15+
16+
let b:undo_ftplugin = "setlocal comments< commentstring< formatoptions<"

0 commit comments

Comments
 (0)