[PATCH] D122916: Vim Syntax Error

Priyansh Singh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 1 09:43:11 PDT 2022


ps-19 created this revision.
ps-19 added reviewers: aaron.ballman, ktkachov, kbarton, beanz.
Herald added a project: All.
ps-19 requested review of this revision.
Herald added a project: LLVM.

As per https://vi.stackexchange.com/questions/6265/usage-of-the-operator i think operator is actually "=~?" not "=?".


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122916

Files:
  llvm/utils/vim/indent/llvm.vim


Index: llvm/utils/vim/indent/llvm.vim
===================================================================
--- llvm/utils/vim/indent/llvm.vim
+++ llvm/utils/vim/indent/llvm.vim
@@ -52,7 +52,7 @@
 
   " Find a non-blank not-completely commented line above the current line.
   let prev_lnum = prevnonblank(v:lnum - 1)
-  while prev_lnum > 0 && synIDattr(synID(prev_lnum, indent(prev_lnum)+1, 0), "name") =? "string\|comment"
+  while prev_lnum > 0 && synIDattr(synID(prev_lnum, indent(prev_lnum)+1, 0), "name") =~? "string\|comment"
     let prev_lnum = prevnonblank(prev_lnum-1)
   endwhile
   " Hit the start of the file, use zero indent.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122916.419787.patch
Type: text/x-patch
Size: 639 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220401/9461a5bb/attachment.bin>


More information about the llvm-commits mailing list