我在检查数据时使用Vim。 我想特别启动Vim":"模式,例如处理终端中的二进制数据:
xxd -ps r328_0000.raw > /tmp/1 && vim /tmp/1 :%s/ffff//gn
|
?
如何在":" -mode in terminal中启动Vim?
答案 0 :(得分:1)
您可以使用-c选项(或只是+)执行此操作:
vim -c "%s/ffff//gn"
vim +"%s/ffff//gn"
从联系手册:
+{command}
-c {command}
{command} will be executed after the first file has been
read. {command} is interpreted as an Ex command. If the
{command} contains spaces it must be enclosed in double
quotes (this depends on the shell that is used). Example:
Vim "+set si" main.c
Note: You can use up to 10 "+" or "-c" commands.