如何在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
相關文章
相關標籤/搜索