vim中的命令行 %! 是啥意思?

:%! command

pipes the current file's contents to command's stdin, and replaces the file's contents with command's stdout.

So, :%! sort is pretty much the same as (from a shell) cat file | sort > tmp && mv tmp file.

 

来源:https://vi.stackexchange.com/questions/10098/what-does-mean

posted @ 2023-02-26 16:52  yinhuachen  阅读(1003)  评论(0)    收藏  举报