Home
Sign Up
Sign In
V2EX
›
Vim
vim 替换 URL 你是怎么做得?
qiukun
·
May 28, 2012
· 7303 views
This topic created in 5273 days ago, the information mentioned may be changed or developed.
总不能一直 \/ 吧?
vim
URL
替换
5 replies
•
1970-01-01 08:00:00 +08:00
Chris_Ys
May 28, 2012
1
替换字符串,我一般用正则替换:
:%s /pattern/new_string/gc
qiukun
OP
May 28, 2012
2
:s#
http://www.example.com/index.html#http://example.com/#
done
cy527300280
May 28, 2012
1
3
:%s###
qiukun
OP
May 28, 2012
4
# 也可以替换为任意字符
gavingeng
May 28, 2012
5
:%s/xxx/xxxx/g
要么sed
sed -i.bak 's/xxx/xxxx/g' $file
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
4450 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 30ms ·
UTC 03:54
·
PVG 11:54
·
LAX 19:54
·
JFK 22:54
♥ Do have faith in what you're doing.
❯