####
: read ! shell_command // VIM read in the output of shell_command
####
:1,$ ! shell_command // output the whole text as input to shell_command and save the output of this shell_command to replace the original test
:0 ! date // create a time stamp to the test
####
:g//S/,/^/s*$/join // join each paragraph to a single line.
####
matches equivalent ~
/d digit [0−9]
/D non−digit [^0−9]
/x hex digit [0−9a−fA−F]
/X non−hex digit [^0−9a−fA−F]
/s white space [ ]
/S non−white characters [^ ]
/l lowercase alpha [a−z]
/L non−lowercase alpha [^a−z]
/u uppercase alpha [A−Z]
/U non−uppercase alpha [^A−Z]
: read ! shell_command // VIM read in the output of shell_command
####
:1,$ ! shell_command // output the whole text as input to shell_command and save the output of this shell_command to replace the original test
:0 ! date // create a time stamp to the test
####
:g//S/,/^/s*$/join // join each paragraph to a single line.
####
matches equivalent ~
/d digit [0−9]
/D non−digit [^0−9]
/x hex digit [0−9a−fA−F]
/X non−hex digit [^0−9a−fA−F]
/s white space [ ]
/S non−white characters [^ ]
/l lowercase alpha [a−z]
/L non−lowercase alpha [^a−z]
/u uppercase alpha [A−Z]
/U non−uppercase alpha [^A−Z]
本文介绍了 Vim 编辑器中的实用命令,包括如何读取 shell 命令输出、将整个文本作为输入传递给 shell 命令并保存输出结果、创建时间戳等。此外,还详细解释了 Vim 中的正则表达式匹配规则,例如如何匹配数字、非数字字符、十六进制数字等。
989

被折叠的 条评论
为什么被折叠?



