[llvm] [vim] set commentstring (PR #71838)

Nick Desaulniers via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 10:26:36 PST 2023


https://github.com/nickdesaulniers created https://github.com/llvm/llvm-project/pull/71838

I recently moved from using vim to lunarvim. I noticed that `gcc` (lol)
wasn't able to comment out lines, because commentstring is not set.

Thanks to Chase Colman for the suggestion in
https://github.com/LunarVim/LunarVim/issues/4394.


>From 22e9848fe2987ec165cc360cc475a61b355f1d5c Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <ndesaulniers at google.com>
Date: Thu, 9 Nov 2023 10:23:22 -0800
Subject: [PATCH] [vim] set commentstring

I recently moved from using vim to lunarvim. I noticed that `gcc` (lol)
wasn't able to comment out lines, because commentstring is not set.

Thanks to Chase Colman for the suggestion in
https://github.com/LunarVim/LunarVim/issues/4394.
---
 llvm/utils/vim/syntax/llvm.vim | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/llvm/utils/vim/syntax/llvm.vim b/llvm/utils/vim/syntax/llvm.vim
index d86e3d1ddbc27ff..bf08bbc5cb58f6c 100644
--- a/llvm/utils/vim/syntax/llvm.vim
+++ b/llvm/utils/vim/syntax/llvm.vim
@@ -270,3 +270,5 @@ if version >= 508 || !exists("did_c_syn_inits")
 endif
 
 let b:current_syntax = "llvm"
+
+setlocal commentstring=;\ %s



More information about the llvm-commits mailing list