在 VIM 中在行尾插入

所以很长一段时间以来,我有一个坏习惯,就是走到一行的末尾,按 i键,然后按右箭头插入最后一个字符。然而,这是非常低效的,而且不可能与 hjkl一起做。

什么是一个更好的方法来插入在非常结束的行?

45752 次浏览

The $ positions you at the end of line.

Then, to enter insert mode AFTER the end of line, press a.

So, simply typing $a while in command mode will do what you are asking.

Use A command instead of i. The command appends text at the end of the line. See :help A.


In normal mode press A (uppercase). Vim will be switched to insert mode, and the cursor will be moved to the end of the current line ready for input.