On 08/17/2013 02:35 PM, Gautier DI FOLCO wrote:
> 2013/8/16 Ben Fritz <[email protected]>
> > You can try using whatever you get by actually typing
> > <C-V><S-CR> as the left side of a mapping. E.g. so you
> > mapping looks like:
>
> > map ^[0^M A
>
> Thanks, It works but I feel dirty :/

I've been working on fixkey, a plugin to help Vim use non-ASCII
keys in a terminal emulator:
http://www.vim.org/scripts/script.php?script_id=4693

It gathers the community wisdom floating around on the Vim wiki,
the mailing lists, and the Internet at large into one place.
The plugin configures Vim to match modern terminal behavior.  It
comes with instructions for any additional terminal
configuration that must be done to get maximum functionality.

Earlier in the thread, you'd said "I can see [0^M for <S-CR>,
so, theoretically I can map <S-CR>, can't I?"  I haven't seen
that sequence in my testing of the terminals supported by the
fixkey plugin; which terminal emulator are you using?

If you are using Xterm or KDE Konsole, then perhaps you meant
the sequence ^[OM (<Escape>OM), in which case fixkey should take
care of configuring Vim's keycode for <S-Enter> (also known as
<S-CR>).  In that case, you can install the plugin and map
<S-Enter> to whatever you'd like, e.g.:

  inoremap <S-Enter>  Shift-Enter

Then, in insert mode, pressing <S-Enter> should insert
"Shift-Enter" into your buffer as a test.

I should mention that terminals are strange beasts.
Documentation can be confusing and can conflict with empirically
determined behavior.  The fixkey plugin represents my best
attempt at supporting the terminals to which I've got easy
access.  A given terminal may be configured differently on your
system than on mine, causing incorrect behavior.  I'm interested
in improving fixkey to support more terminals, environments, and
keycodes where possible, though there are some problems that
can't be fixed with just a Vim plugin.

Thanks,
Michael Henry

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to