Как перейти к точной последней точке изменения в Vim - PullRequest
38 голосов
/ 13 октября 2011

'. может перейти к строке последнего изменения.Но мне нужно прыгнуть точно в точку.

Ответы [ 2 ]

66 голосов
/ 13 октября 2011

Используйте `..То есть обратный удар, за которым следует точка.

1 голос
/ 10 января 2017

Поскольку изменение имеет начало и конец, `[ и `] также очень полезны:

'[  `[                  To the first character of the previously changed
                        or yanked text.

']  `]                  To the last character of the previously changed or
                        yanked text.

After executing an operator the Cursor is put at the beginning of the text
that was operated upon.  After a put command ("p" or "P") the cursor is
sometimes placed at the first inserted line and sometimes on the last inserted
character.  The four commands above put the cursor at either end.  Example:
After yanking 10 lines you want to go to the last one of them: "10Y']".  After
inserting several lines with the "p" command you want to jump to the lowest
inserted line: "p']".  This also works for text that has been inserted.
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...