diff --git a/runtime/ftplugin/javacc.vim b/runtime/ftplugin/javacc.vim new file mode 100644 index 0000000000..780c68b0f9 --- /dev/null +++ b/runtime/ftplugin/javacc.vim @@ -0,0 +1,20 @@ +" Vim filetype plugin +" Language: JavaCC +" Maintainer: Riley Bruins +" Last Change: 2024 Jul 06 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +" Set 'formatoptions' to break comment lines but not other lines, +" and insert the comment leader when hitting or using "o". +setlocal formatoptions-=t formatoptions+=croql + +" Set 'comments' to format dashed lists in comments. Behaves just like C. +setlocal comments& comments^=sO:*\ -,mO:*\ \ ,exO:*/ + +setlocal commentstring=//\ %s + +let b:undo_ftplugin = 'setl fo< com< cms<'