我如何用&符号“&"进行替换?在vim中? [英] how do I make a replacement with ampersand "&" in vim?

查看:39
本文介绍了我如何用&符号“&"进行替换?在vim中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所说.我想用与号 (&) 替换制表符".

As the title says. I want to replace, say "tabs", with the ampersand sign (&).

我使用:

:%s/\t/&/g

当然不行.我在 mac os x 上使用 vim(如果这有区别的话).谢谢!

and of course it doesn't work. I use vim on mac os x (if this makes a difference). Thanks!

推荐答案

您确定是 & 符号的问题吗?我收到了更多关于该标签的投诉.不要忘记逃避它.

Are you sure it's the ampersand that's the problem? I got more complaints about the tab. Don't forget to escape it.

:%s/\t/\&/g

这篇关于我如何用&符号“&"进行替换?在vim中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆