Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 shell 脚本对当前目录中的所有文件运行 vim 命令“:retab”?
我找到了可以帮助你的东西
for F in *.{c,h}pp ; do vim -c ":retab" -c ":wq" "$F" ; done
这应该可以满足您的需求;)也许您需要根据需要更改 for 循环条件