skip to main
|
skip to sidebar
Doro One Two Three
2009/03/03
VIM tip: 搜尋不分大小寫及取代
:set ic
ic是ignorecase的縮寫,不分大小寫在windows上常用到,Linux上就不太常用到了。若是需要用原字串作為取代一部分,可以再用&符號或\1之類的表示。舉例來說,若想取代所有AAA, AAa, Aaa...分別取代成AAA123, AAa123, Aaa123,可以這樣輸入:
:set ic
:%s/AAA/&123/cg
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
About Me
Unknown
View my complete profile
My Gallery
打造自己的VIM 系列文章
Labels
Programming
(53)
vim
(30)
Linux
(28)
Computer
(27)
Ubuntu
(11)
Life
(9)
NAS
(8)
Diary
(6)
Hacking
(5)
Arduino
(4)
QNAP
(4)
wargame
(4)
android
(3)
python
(3)
Drama
(2)
GTK
(2)
Graphic
(2)
Investment
(2)
Web
(2)
docker
(2)
GDB
(1)
Kernel
(1)
M$
(1)
embedded
(1)
Blog Archive
►
2018
(1)
►
March
(1)
►
2017
(3)
►
December
(1)
►
October
(1)
►
June
(1)
►
2015
(2)
►
November
(1)
►
August
(1)
►
2013
(29)
►
November
(5)
►
October
(2)
►
September
(1)
►
August
(3)
►
July
(2)
►
June
(6)
►
May
(5)
►
April
(3)
►
March
(2)
►
2012
(1)
►
August
(1)
►
2011
(7)
►
September
(2)
►
August
(3)
►
July
(1)
►
June
(1)
►
2010
(6)
►
September
(1)
►
August
(2)
►
May
(2)
►
April
(1)
▼
2009
(32)
►
August
(4)
►
July
(1)
►
April
(1)
▼
March
(10)
輕輕鬆鬆寫VIM plugin: 變數及表示式
VIM: 製作跟VIM help一樣能跳來跳去的文字檔
VIM tip: 刪除搜尋到的行
VIM 系列文章的下一步
打造自己的VIM: 源碼補齊 SuperTab OmniCppComplete Code_Complete
VIM tip: TabBar的密技
VIM tip: 自動插入數字列號,使用巨集及VIM內建函式
打造自己的VIM: 多檔字串搜尋 EasyGrep
VIM tip: 搜尋不分大小寫及取代
Linux Tip: less從最後一行開始看
►
February
(15)
►
January
(1)
►
2008
(26)
►
July
(4)
►
June
(2)
►
April
(1)
►
March
(5)
►
February
(5)
►
January
(9)
Posts
Atom
Posts
Comments
Atom
Comments
No comments:
Post a Comment