这只是中间的vimgolf挑战在做什么?

Non*_*ona 2 vim

因此,在http://www.vimgolf.com/challenges/54862fbb3f90ac0002904cf5中,一个解决方案是:

)3:wq!<CR>
Run Code Online (Sandbox Code Playgroud)

我的vim备忘单说:

)是"结束句".不确定"3"是如何适应的.

但是"wq!" 我知道写/退出.

这组击键是做什么的?

Lie*_*ers 6

命令

)3:wq!<CR>

输入

Leave only the
numbered lines.
LINE 1
LINE 2
LINE 3
That's all.
Thank you
very much.
Run Code Online (Sandbox Code Playgroud)

分解

)      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
Run Code Online (Sandbox Code Playgroud)

我不确定:从正常模式切换到命令模式的位置,因此在故障后同样有效

)      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
Run Code Online (Sandbox Code Playgroud)