From db9d0245d14c2c48727af5f269e579f284e20611 Mon Sep 17 00:00:00 2001 From: Henry Baba-Weiss Date: Tue, 24 Feb 2026 04:33:30 -0800 Subject: [PATCH] [vim] Set commentstring for TableGen files (#182654) Neovim supports [commenting and uncommenting lines](https://neovim.io/doc/user/various.html#commenting) based on what the 'commentstring' option is set to, but this isn't set for TableGen files. The filetype plugin for C++ built into both vim and neovim sets 'commentstring' to `// %s`, so use that in the TableGen filetype plugin as well. --- llvm/utils/vim/ftplugin/tablegen.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm/utils/vim/ftplugin/tablegen.vim b/llvm/utils/vim/ftplugin/tablegen.vim index cfae846c818b..497958bfe1db 100644 --- a/llvm/utils/vim/ftplugin/tablegen.vim +++ b/llvm/utils/vim/ftplugin/tablegen.vim @@ -10,3 +10,4 @@ let b:did_ftplugin = 1 setlocal matchpairs+=<:> setlocal softtabstop=2 shiftwidth=2 setlocal expandtab +setlocal commentstring=//\ %s