I would like to make some modification to the code of this plugin.
It adds / changes some default keybindings. Among them are <C-b>
and <C-f>
which move the cursor one character to the left / right.
The problem is they break the undo sequence, because they are mapped to <Left>
and <Right>
. The solution is to prefix them with <C-g>U
.
However, I don't know in which version and which patch <C-g>U
appeared in Vim.
I tried :helpgrep CTRL-G.*U
which gave me 5 results in the quickfix list, but none of them gave me the info.
So I have 2 questions:
- How can I find precisely when
<C-g>U
appeared in Vim? - How can I reliably test in a script if vim supports it?
Let's say I find out that <C-g>U
appeared in Vim 7.4.567, would the following line be the proper way to test?:
if v:version > 704 || v:version == 704 && has("patch567")
if (v:version == 704 && has("patch393")) || v:version > 704
withset renderoptions
and seems to work pretty well.<C-g>U
was added...