如何通过在vim编辑器中按命令行中的键移动到连续行的末尾

时间:2013-11-08 05:36:21

标签: vim

我的文件包含一些内容。

      This file is just for testing and it may contain no about about any related data. 
      But used for copy of move the content to one file to another.

给定的行是同一行的延续。如何通过按单键移动光标到第一行的结尾。

我的_cursor在这里等待

      _This file is just for testing and it may contain no about about any related data.
       But used for copy of move the content to one file to another.

按singe命令或键我需要移动到光标第一行的末尾_。

      This file is just for testing and it may contain no about about any related data._
       But used for copy of move the content to one file to another.

如果有任何办法,请告诉我。

1 个答案:

答案 0 :(得分:5)

  1. 您可以使用$符号移至vim中的行尾。 您可以使用前面$前面的数字来移动n。例如,2$从光标移动到第二行的末尾。

  2. 当“wrap”打开时,g$移动到SCREEN行的末尾。所以, 它的功能与$不同。例如:如果要使用2g$向下移动2个屏幕行,如果要向下移动2行(打开换行时),请使用2$

  3. 有关详细信息,您可以执行:help $:help g$

相关问题