我将要理解vim的变更列表,但是我有困难理解以下行为:
例如,我插入了以下文本:
I like chips and fish.
我意识到名词的顺序错了,所以我想改为:
I like fish and chips.
从一个没有 .vimrc 的新的 vim 实例开始(vim -u NONE
),这是我所做的准确步骤(# 仅用于解释):
iI like chips and fish.<Esc> # Insert text. Realize I want to switch the words
Fc # Jump back to 'chips'
de # Delete the word (and put it in anon register)
ff # Jump to the 'fish' word
vep # Select the word, and paste from anon register
g; # Try to jump back to the position where I change
# the word 'chips'. It doesn't work and I get:
E19: Mark has invalid line number
# To see what is going on i print the change list:
:changes
change line col text
2 1 12 I like and chips.
1 2 12 -invalid-
>
我的第一个问题是为什么一开始跳转没有起作用?
其次,更改列表中的“-invalid-”条目对我来说毫无意义。正如您所看到的,我从未超出第1行。为什么有第2行的条目?
我正在使用Vim 7.4.52
更新:似乎“-invalid-”是一个错误。我已经报告了这个问题:https://code.google.com/p/vim/issues/detail?id=283