On my powerbook, running 10.2.8, when I run vi it acts differently and
I'd like it the other way. On my mac, when in insert mode and I strike
an arrow key, it does the arrow key movement ans stays in insert mode.
I don't like this.
I have tried many settings and tried mapping keys; both a horrible
failure probably because I don't really know what I'm doing. (don't tell
anyone)
Does anyone know what I'm talking about?
Does anyone know how to adjust it the way I'd like it?
TIA
G
If you're using vim, this is as simple as
imap <Up> <Esc>k
and so on for Down, Left and Right (if I've understood you correctly).
R.
The default mappings are... and you can see that the arrow keys are
mapped to <Esc>"Direction"<Append>. I'll just put a couple of
:map! ^[[A ^[k
in my .exrc as well as some others that seem promising. Thanks.
I don't want to get a big argument started here, but, in brief, why
would I want to use vim instead of vi?
Thanks again.
g
Default...
:map
^[[2~ i insert at cursor
^[[3~ x delete character
^[[5~ ^B page up
^[[6~ ^F page down
^[[A k cursor up
^[[B j cursor down
^[[C l cursor right
^[[D h cursor left
:map!
^[[A ^[ka cursor up
^[[B ^[ja cursor down
^[[C ^[la cursor right
^[[D ^[ha cursor left
for the same reasons you switch
from a beetle to a limousine.
but anyone who cannot afford a name probably
won't be able to buy anything, anyway.
then again, vim is free..
Sven
--
$ vim -c ":help vi-differences"
> I don't want to get a big argument started here, but, in brief, why
> would I want to use vim instead of vi?
99% vi compatibility when you want it. This makes Vim a natural choice
as an editor on systems that do not have vi, if your fingers know and
love vi.
Operating system support for everyone's UNIX/Linux, Amiga, MS-DOS,
Windows (all flavors), OS/2, Atari, OpenVMS, BeOS, MacOS, MacOSX (which
I use if I have to write anything extensive on my Mac), etc...
Multi-level undo (and redo).
GUI interface available (gvim) with support for mice, scroll bars,
menus, etc...
Split windows and multiple active buffers.
Syntax coloring for different programming languages.
Side-by-side visual differences (vimdiff & gvimdiff).
Instant Macros by executing the commands once while recording them, then
execute the Macro to repeat the commands.
Visual selection mode that highlights the text, plus rectangular select!
Command history for ex mode commands and the ability to edit them for
reuse.
Search pattern history and the ability to edit previous patterns for new
searches.
Very very Long line support with either line wrapping or left/right
window scrolling.
Paragraph and C comment reformatting.
Built-in :make command for Edit-Compile-Edit-Compile...
Cscope support.
Improved auto-indenting for C language source.
Search for patterns in the current file as well as #include files.
Automatically execute commands to customize the environment based on the
file name or type.
A powerful scripting language for customizing the environment during
initialization or for writing your own new commands.
The ability to save state across editing sessions via the .viminfo file.