On 24/05/11 18:19, Daniel Fishman wrote:
Hello,
In documentation about insert mode (':he insert.txt') there is a following
example:
---------------------------------------------
An example for using CTRL-G u:
:inoremap<C-H> <C-G>u<C-H>
This redefines the backspace key to start a new undo sequence. You can now
undo the effect of the backspace key, without changing what you typed before
that, with CTRL-O u.
---------------------------------------------
When I tested this example, I didn't get the expected behaviour - the result
was as though backspace wasn't redefined. The example started working only
when I defined the mapping as follows:
':inoremap<BS> <C-G>u<BS>'
Also, according to the documentation (':he keycodes'), I expected that
typing ':<ctrl-k><ctrl-h>' will result in string'<BS>' written on the
command line, similarly to ':<ctrl-k><ctrl-@>', which results in string
'<Nul>' written on the command line (I should note that in the last case
most of the keys don't work as I expected, for example ':<ctrl-k><ctrl-[>'
doesn't write the string '<Esc>' etc.).
I see that<ctrl-h> is equivalent to backspace in the sense that in insert
mode<ctrl-h> deletes character before the cursor, similarly to the
backspace.
Why in the cases above I don't get the expected behaviour?
Thanks.
What behaviour do you get?
Best regards,
Tony.
--
The superpowers often behave like two heavily armed blind men feeling
their way around a room, each believing himself in mortal peril from
the other, whom he assumes to have perfect vision. Each tends to
ascribe to the other side a consistency, forsight and coherence that
its own experience belies. Of course, even two blind men can do
enormous damage to each other, not to speak of the room.
-- Henry Kissinger
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php