:%! 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
标签:tmp,sort,命令行,vim,command,啥意思,file,contents From: https://www.cnblogs.com/yinhuachen/p/17157032.html