所以在工作http://www.vimgolf.com/challenges/54862fbb3f90ac0002904cf5一种解决方案是:这只是中间的vimgolf挑战在做什么?
)3:wq!<CR>
我VIM小抄说:
)是 “结句”。不知道“3”如何适合。
但是“wq!”我知道写/退出。
这组键击是干什么的?
所以在工作http://www.vimgolf.com/challenges/54862fbb3f90ac0002904cf5一种解决方案是:这只是中间的vimgolf挑战在做什么?
)3:wq!<CR>
我VIM小抄说:
)是 “结句”。不知道“3”如何适合。
但是“wq!”我知道写/退出。
这组键击是干什么的?
命令
)3:wq!<CR>
输入
Leave only the
numbered lines.
LINE 1
LINE 2
LINE 3
That's all.
Thank you
very much.
击穿
) goes one sentence forward. This positions the cursor at LINE 1
3 starts a range of 3 lines for the next command.
:wq! writes the range to the file.
You should notice that when typing :, the range get's set to .,.+2
我不知道在哪里放置:
,因为它从普通模式切换到命令模式,以便以下故障同样有效
) goes one sentence forward. This positions the cursor at LINE 1
3: starts a range of 3 lines and enters command line mode
wq! writes the range to the file.
You should notice that when typing :, the range get's set to .,.+2
)
把光标当前句子后,上LINE 1
。
3:command
由Vim扩展到:.,.+2command
,表示“在当前行和下两行执行command
”。
.,.+2wq!
只将给定的行写入文件,从缓冲区/文件中有效地删除任何其他行。
请参阅:help range
和:help :write
。