Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/vim/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在gvim中从当前点到文件结尾的排序?_Vim - Fatal编程技术网

在gvim中从当前点到文件结尾的排序?

在gvim中从当前点到文件结尾的排序?,vim,Vim,命令模式(gvim)下的以下命令 导致 E464: Ambiguous use of user defined-command :help E464 用户定义命令的使用不明确 有两个具有通用名称前缀的用户定义命令,您使用 命令行完成以执行其中一个|用户命令不明确| 示例:> :命令MyCommand1回显“一” :命令MyCommand2回显“二” :MyCommand 不是编辑器命令 我已经盯着它看了一会儿了,有人能按我的方式扔一根骨头吗,或者提供一种不用视觉模式就能做到这一点的方法吗?我

命令模式(gvim)下的以下命令

导致

E464: Ambiguous use of user defined-command

:help E464
用户定义命令的使用不明确 有两个具有通用名称前缀的用户定义命令,您使用 命令行完成以执行其中一个|用户命令不明确| 示例:> :命令MyCommand1回显“一” :命令MyCommand2回显“二” :MyCommand 不是编辑器命令
我已经盯着它看了一会儿了,有人能按我的方式扔一根骨头吗,或者提供一种不用视觉模式就能做到这一点的方法吗?

我通常使用
:,,$!排序
;这对你有用吗

原创海报编辑

G不是正确的范围规格。从:帮助范围输出,请参见下文

Line numbers may be specified with: *:range* *E14* *{address}* {number} an absolute line number . the current line *:.* $ the last line in the file *:$* % equal to 1,$ (the entire file) *:%* 't position of mark t (lowercase) *:'* 'T position of mark T (uppercase); when the mark is in another file it cannot be used in a range /{pattern}[/] the next line where {pattern} matches *:/* ?{pattern}[?] the previous line where {pattern} matches *:?* \/ the next line where the previously used search pattern matches \? the previous line where the previously used search pattern matches \& the next line where the previously used substitute pattern matches Each may be followed (several times) by '+' or '-' and an optional number. This number is added or subtracted from the preceding line number. If the number is omitted, 1 is used. 行号可以指定为:*:范围**E14**{address}* {number}绝对行号 . 当前行*:* $文件中的最后一行*:$* %等于1,$(整个文件)*:%* 't标记t的位置(小写)*:'* 'T标记T的位置(大写);当标记处于 无法在某个范围内使用另一个文件 /{pattern}[/]下一行{pattern}匹配*:/* ?{pattern}[?]前一行,{pattern}匹配*:* \/前面使用的搜索的下一行 模式匹配 \? 先前使用的搜索的前一行 模式匹配 \&先前使用的替代品所在的下一行 模式匹配 每一个后面都可以跟“+”或“-”以及一个可选数字(多次)。 此数字与前一行号相加或相减。如果 省略数字,使用1。
G是一个运动,而不是范围说明符。请参见
:帮助范围

" vim has internal sort :.,$sort "if has numbers use :.,$sort n "to delete duplicated lines :.,$sort u " read :h sort “vim具有内部排序 :,$sort “如果数字有用的话 :$sort n “删除重复的行 :,$sort u 读:h排序
给我这个蝙蝠侠谜语:一个人怎么做“!{motion}{filter}”?这些都不行:!格斯波特!G、 排序!G sortWait,它在vim中也起作用!:-P(至少是我的版本)显然不在我的Mac上的vim 7.2.22中。我从shell中获得“Gsort:command not found”。好吧,至少我不是傻瓜!我认为议案必须在表决前提出!这就是我想要做的。但我把动作和范围搞混了!Gsort导致找不到Gsort(如我所料):G排序会导致上面的模糊现象。@John:如果你在做排序的话!运动的东西,不要打冒号!你得把枪放下!在vi模式下,而不是ex模式下!(后者期望一个范围。) Line numbers may be specified with: *:range* *E14* *{address}* {number} an absolute line number . the current line *:.* $ the last line in the file *:$* % equal to 1,$ (the entire file) *:%* 't position of mark t (lowercase) *:'* 'T position of mark T (uppercase); when the mark is in another file it cannot be used in a range /{pattern}[/] the next line where {pattern} matches *:/* ?{pattern}[?] the previous line where {pattern} matches *:?* \/ the next line where the previously used search pattern matches \? the previous line where the previously used search pattern matches \& the next line where the previously used substitute pattern matches Each may be followed (several times) by '+' or '-' and an optional number. This number is added or subtracted from the preceding line number. If the number is omitted, 1 is used. " vim has internal sort :.,$sort "if has numbers use :.,$sort n "to delete duplicated lines :.,$sort u " read :h sort