> In many terminals, the cursor keys send sequences that
> begin with <Esc>. E.g., someone on the list recently
> had trouble with ctrl+arrow keys not being recognized.
> The keys in whatever terminal it was send:
>
> <Esc>Oa - <C-Up> <Esc>Oc - <C-Right>
> <Esc>Ob - <C-Down> <Esc>Od - <C-Left>
>
> So, Vim can't tell the difference between
> '<Esc>' followed by 'O', and '<C-arrow>'.
yep.. here's a workaround: use i_CTRL-O
to jump out of insert mode for one command.
so opening a new line below or above the current line
becomes "CTRL-O o" or "CTRL-O O", respectively.
i use CTRL-O in mappings, eg
to use CTRL-A in insert mode
to jump to the beginning of the line
(actually, to the first non-whitespace):
imap <c-a> <c-o>I
and i also use it for writing
the current buffer with ",,":
" 2007-05-09
" a quick way to save:
map :w<cr>
imap <c-o>:w<cr>
enjoy :)
Sven
--
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
To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
No comments:
Post a Comment