Paul LeoNerd Evans wrote:

> On Fri, 02 May 2008 22:23:44 +0200
> Bram Moolenaar <[EMAIL PROTECTED]> wrote:
> 
> > I don't see the point.
> 
> In that case, I'd like to hear your suggestion on how I may use
> combinations of Shift/Ctrl/Alt with keypresses in a normal vim.

Nothing special, most of them can be recognized already.  Especially if
you are using an xterm.  Try ":set term=xterm" and then ":set termcap".
The entries which contain ";*" recognize modifier keys.  For other
terminals you will need to add the termcap entries somehow.

> Currently, the only way I find that works at all is to keep a giant list
> of :map and :map! commands, which recognise the sequences. See the
> attached file.
> 
> This sortof works; it's enough to get things like Ctrl-LR to be move word
> left/right, Alt+arrow to be move focus to window, and Alt+[number] to
> be :b1 to :b10.
> 
> It doesn't work in paste mode, and it upsets the ttytime settings.
> 
> Also, it breaks UTF-8 input if I try to map Alt+letter.

Alt-letter is supposed to work to get the letter with the 8th bit set.
Then converted to whatever encoding you are using.  This is how vi
traditionally works, in combination with traditional terminals (and
terminal emulators).

Also note that things like <Esc>0 should never be produced by a single
key, since it should mean <Esc> (leave Insert mode), and zero (go to
first column).  Relying on timing is not a good idea.

> If you know of a better way to make all these things possible, I would
> very much like to hear it.

It appears you need to read  :help xterm-modifier-keys

-- 
Anyone who is capable of getting themselves made President should on no
account be allowed to do the job.
                -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

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

Raspunde prin e-mail lui