Not as far as I know (besides the obvious up, down, left right). I have
this in my vimrc:
" allow for emacs-like movement in insert mode
noremap! <C-p> <up>
noremap! <C-n> <down>
noremap! <C-f> <right>
noremap! <C-b> <left>
noremap! <M-f> <C-right>
noremap! <M-b> <C-left>
You would of course change the above by substituting hjkl instead of
bnpf. The abovementioned mappings would work in command-line mode as
well, which was the original reason for me adding it.
Regards
--
[ Albie Janse van Rensburg ~ http://morph.telspace.co.za ]
A foolish consistency is the hobgoblin of little minds.
-- Ralph Waldo Emerson
Well, of course h j k l in Insert modes insert the letters h j k l into
your text, and I ton't think you would want to type only text containing
none of these four letters.
With Ctrl, Ctrl-J is linefeed (which Vim handles as Enter IIUC) and
Ctrl-H is Backspace so I think that's excluded too. (And the presence or
absence of the Shift modifier is immaterial for the meaning of Ctrl +
letter).
Alt-h to Alt-l are synonyms to è é ê ë respectively. I don't know about
you, but I wouldn't want to remap these letters, all of which are used
with various frequencies in my native language (French). Alt-H to Alt-L
(or Alt-shift-h to Alt-shift-l) are the uppercase counterparts of these
accented letters. You might try Ctrl-Alt-h to Ctrl-Alt-l if your gvim
sees them. (In Latin1 or UTF-8 the equivalent characters, 0x88 to 0x8B,
are rarely-used control characters, but if your preferred encoding is
Windows-1252 they might collide with something you might want to use, I
don't know).
The standard way of moving the cursor in Insert mode, even if it makes
you puke, is by using the cursor-movement keys. You could also use the
Ctrl-O prefix, see |i_CTRL-O|, but it isn't very practical for such
constantly-used keys. Another possibility would be to move your hand
straight up and use F5 to F8 (after remapping them to <Left> <Down> <Up>
and <Right> respectively).
And in case you didn't know, the latter is achieved by
:map! <F5> <Left>
:map! <F6> <Down>
:map! <F7> <Up>
:map! <F8> <Right>
Best regards,
Tony.
--
BRIDGEKEEPER: What is the air-speed velocity of an unladen swallow?
ARTHUR: What do you mean? An African or European swallow?
BRIDGEKEEPER: Er ... I don't know that ... Aaaaarrrrrrggghhh!
BRIDGEKEEPER is cast into the gorge.
"Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD
Just be aware that those mappings will override the default
functionality for those ctrl-<letter> keys. In insert mode, ctrl-p does
word completion, for instance. And as Tony Mechelynck mentioned, ctrl-k
starts digraph entry, which is very useful for typing in a non-English
language.
I have actually now restricted my mappings to only the command-line mode
(cnoremap), it generally being the most limited mode in Vim, IMO.
Regards
--
[ Albie Janse van Rensburg ~ http://morph.telspace.co.za ]
"Life is too important to take seriously."
-- Corky Siegel
I'm doing less and less operations in insert mode, and I agree that it
is a better way to edit. I think the only situation where I actually
need to move around is when I type something like that (JS):
myFunc({ Obj: "true"})
I tend to write myFunc(), then move one char left, then type {}, etc..
The only better ways I found were:
1. create an imap {} {}<Left>
2. use <C-O>h
The first one is annoying when I want to just type {} alone and I'm
having hard time getting used to the second.. But I'll get there.
Bertrand
I haven't; but I use only Fnn keys (or shift-Fnn keys), and, in Normal
mode only, non-ASCII keys (my Belgian keyboard has a number of these: ²
³ é § è ç à ° µ £ ù -- not counting the characters obtained with AltGr
or with dead-circumflex and dead-diaeresis) as the {lhs} of my mappings,
unless I explicitly want to override a preexisting key binding. Also, my
mapping for <F1> intentionally overrides the default functionality
(which is "help" as in many programs), as I have: ":map <F1> :bot
help<CR>" to have it open the help window (if not already open) at the
very bottom rather than next to the current window.
Best regards,
Tony.
--
I can read your mind, and you should be ashamed of yourself.
Well, I wouldn't want to move down one line whenever I try to insert an
e-acute, which is the most frequent accented letter in French. I see YM
does V.
Best regards,
Tony.
--
Democracy means simply the bludgeoning of the people by the people for
the people.
-- Oscar Wilde
Well, I feel quite comfortable using <Left> <Right> (moving by single
characters), <C-Left> <C-Right> (by words), <Home> <End> (to either end
of the current line), <Up> <Down> (by lines), <PageUp> <PageDown> (by
pages i.e. screenfulls) when in Insert mode -- and each of these
commands stops undo, it's only when you enter characters one after
another without cursor moves that they constitute a single "undo block".
In fact, the following
:inoremap <Space> <Space><Left><Right>
:inoremap <Tab> <Tab><Left><Right>
:inoremap <CR> <CR><Up><Down>
create an undo point after each WORD.
Best regards,
Tony.
--
It is illegal for a driver to be blindfolded while operating a vehicle.
[real standing law in Alabama, United States of America]
Alternatively to <Left><Right>, you could use <C-G>u, which breaks an undo
sequence and does not move the pointer.
--
Andreas.
True; but (a) these <Left><Right> and <Up><Down> mappings were invented
some time ago, when the latest Vim version (which was some Vim 6.x)
didn't yet know about Ctrl-G u, and (b) they illustrate the fact that
"everything you do from i or a to Esc" can be more than one undo block
if you move the cursor in the meantime, which is what I mentioned just
above those mappings in the same post.
Best regards,
Tony.
--
"But what we need to know is, do people want nasally-insertable
computers?"