0

In my .vimrc I have case-insensitive search turned how. However, rarely I'll search for something like "HEAD" (a git word) where I need it to be case-sensitive. Is there a flag that can be entered in the search so that I can temporarily override the search settings, something like:

/HEAD*case-sensitive
lurker
  • 56,987
  • 9
  • 69
  • 103
David542
  • 104,438
  • 178
  • 489
  • 842
  • 3
    Does this answer your question? [How to do case insensitive search in Vim](https://stackoverflow.com/questions/2287440/how-to-do-case-insensitive-search-in-vim). Just put `\C` anywhere in your search string: `/\CHEAD` or `/HEAD\C`. – lurker May 15 '20 at 01:25
  • @lurker `\C` is case sensitive `\c` is case insensitive... – Doktor OSwaldo May 15 '20 at 05:38
  • 1
    `set ignorecase` + `set smartcase` together will let you have case-sensitive search only when you use capital letters somewhere in your search – Biggybi May 15 '20 at 07:42
  • 1
    @DoktorOSwaldo yes I know. If you read the question carefully, you'll see that's what the op wanted. – lurker May 15 '20 at 09:39
  • @lurker HEAD=>TABLE I am sorry! – Doktor OSwaldo May 15 '20 at 11:15

0 Answers0