如何在Vim中进行不区分大小写的搜索 - How to do case insensitive search in Vim

问题:

I'd like to search for an upper case word, for example COPYRIGHT in a file. 我想搜索大写单词,例如文件中的COPYRIGHT。 I tried performing a search like: 我尝试过执行搜索: 正则表达式

/copyright/i    # Doesn't work

but it doesn't work. 但它不起做用。 I know that in Perl, if I give the i flag into a regex it will turn the regex into a case-insensitive regex. 我知道在Perl中,若是我将i标志放入正则表达式,它会将正则表达式转换为不区分大小写的正则表达式。 It seems that Vim has its own way to indicate a case-insensitive regex. 彷佛Vim有本身的方式来表示不区分大小写的正则表达式。 spa


解决方案:

参考一: https://stackoom.com/question/9b4C/如何在Vim中进行不区分大小写的搜索
参考二: https://oldbug.net/q/9b4C/How-to-do-case-insensitive-search-in-Vim
相关文章
相关标签/搜索