Vim 跳到最后一行,但保持在同一列中
在Vim中,可以使用Vim 跳到最后一行,但保持在同一列中,vim,cursor,Vim,Cursor,在Vim中,可以使用G跳转到最后一行(或使用gg跳转到第一行),但该移动也会跳转到第一个非空格字符 是否有一个键绑定可以跳到第一行(或分别跳到最后一行),但保持在同一列中?这将是set nostartofline。有了它,gg和G将尽可能像j等一样保留该列 从:h开始到line: 'startofline' 'sol' 'nostartofline' 'nosol' 'startofline' 'sol' boolean (defau
G
跳转到最后一行(或使用gg
跳转到第一行),但该移动也会跳转到第一个非空格字符
是否有一个键绑定可以跳到第一行(或分别跳到最后一行),但保持在同一列中?这将是
set nostartofline
。有了它,gg和G将尽可能像j等一样保留该列
从:h开始到line
:
'startofline' 'sol' 'nostartofline' 'nosol'
'startofline' 'sol' boolean (default on)
global
{not in Vi}
When "on" the commands listed below move the cursor to the first
non-blank of the line. When off the cursor is kept in the same column
(if possible). This applies to the commands: CTRL-D, CTRL-U, CTRL-B,
CTRL-F, "G", "H", "M", "L", gg, and to the commands "d", "<<" and ">>"
with a linewise operator, with "%" with a count and to buffer changing
commands (CTRL-^, :bnext, :bNext, etc.). [..]
'startofline''sol''nopartofline''nosol'
“startofline”“sol”布尔值(默认为开)
全球的
{不在Vi}
当“开启”时,下面列出的命令将光标移动到第一个位置
行的非空。禁用时,光标将保持在同一列中
(如有可能)。这适用于以下命令:CTRL-D、CTRL-U、CTRL-B、,
CTRL-F、“G”、“H”、“M”、“L”、“gg”和“d”命令
使用逐行运算符,使用带计数的“%”和要更改的缓冲区
命令(CTRL-^、:bnext、:bnext等)。[..]
是的,有一个密钥绑定。但这太离谱了
:第一行,同一列1 CTRL+End
:最后一行,同一列CTRL+End