开发者

vim: have Ctrl+right stop at EOL (just after last character of last word)

开发者 https://www.devze.com 2023-02-13 18:48 出处:网络
In windoze, when I use Ctrl+right, it moves word to word, and if I get to the end of the line, it stops on the last character of the last word + 1 (mayb开发者_StackOverflowe that\'s the EOL character,

In windoze, when I use Ctrl+right, it moves word to word, and if I get to the end of the line, it stops on the last character of the last word + 1 (mayb开发者_StackOverflowe that's the EOL character, not sure). In vim, when I reach the last word using Ctrl+right and hit it again, it skips the EOL and goes to the next word on the next line.

How would I get vim to follow the same method windows uses? Do I need to write a script for that?


Hit Escape, then Shift+A to append (at the EOL). If you fight vim and try to do all your movement in insert mode, vim will win.


I don't know how to change this, but did you know that, being in command mode, $ brings you to the EOL?


Yet another solution:

<C-o> $

while in insert mode. <C-o> allows you to make one normal-mode command and you stay in insert mode.

0

精彩评论

暂无评论...
验证码 换一张
取 消