Saluton Roald :)

Roald <[email protected]> dixit:
> Questions: can I add modes?

Not exactly, but using mappings and some scripting you can achieve what
you want. Just define mappings for normal mode.

> If not: is there a good reason for that?

Current design, I suppose. Moreover, if you think about it, there's
plenty of things that doesn't belong to an editor (browsing files, for
example) but that you can add to an editor and that in fact are present
in Vim: if you add a mode for each and every of them you will end up
with dozens of modes, and it doesn't make sense.

The usage pattern you explained in your message doesn't make sense as a
mode for me, because those actions belong to "normal" mode.

Current design is, IMHO, perfect. You have normal mode for performing
editing tasks, visual mode to visually perform editing tasks and
command mode for ex commands. Operator pending mode is not exactly a
mode, but a helper to be able to fine tune normal mode mappings, and
insert mode is not a mode at all (although it is treated like that to
make defining maps easier), but the result of a command in normal mode
(namely the "i" or "a" commands, for example).

Usually Vim is called "modal" because it can be in "insert mode" or
"normal mode". I don't consider things like that. I prefer to consider
Vim as a command-driven application, one of the commands insert text,
other allows for visual selections, other runs ex commands etc. It's all
about commands, just that.

In you case you want commands that are easier to type than Ctr-w w for
changing windows, not a new mode with a new set of mappings.

My suggestion is that you can use unmapped keys to perform the actions
you use the most with just one keypress, or even use already mapped keys
you don't use, or use a mapleader, etc. For example, I use "gqip" a lot,
so I've mapped "çç" to do that ("ç" is my mapleader), I've mapped "çc"
to comment a block of visually selected lines, etc. Mappings are your
friends, not new modes ;)

> If not: is there any chance of it being implemented?

I can't speak for Bram, but I would bet that it won't ;)

-- 
Raúl "DervishD" Núñez de Arenas Coronado
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui