是否有可能做一個搜索,並在vim,保留搜索項的情況下更換?這是我錯過的intelliJ中的一個有用功能。
舉例來說,像這樣:
:s/[uU]ser/[pP]erson/ (obviously, this doesn't work)
這樣的:
user->person
User->Person
與多個字符又如保存:
:s/[mM]y[uU]ser/[tT]his[pP]erson/g
這樣的:
myuser->thisperson
myUser->thisPerson
MyUser->ThisPerson
SmartCase看起來像我想要的 – 2009-12-16 17:51:40
這個答案幫了我加倍。我使用keepcase進行保留大小寫的搜索。我回到你的答案,找出如何進行搜索,並用不同的多元化拼寫(group/groups => body/bodies)替換。 – 2012-01-27 22:32:04