> On 01/20/12 17:31, Gary Johnson wrote:
>> Someone just posted a question to superuser in which they mentioned
>> discovering that Shift-Enter is the same as Ctrl-F. I experimented
>> a little and discovered that that's true, but only in gvim, not
>> vim, and it's not documented anywhere that I could find, searching
>> for "shift.enter", "s.enter", or "s.cr".
>>
>> It's not a mapping, as ":map<S-CR>" doesn't show anything and it
>> works when gvim is started as "gvim -N -u NONE".
>>
>> My keyboard, using either GNOME Terminal or xterm with vim, doesn't
>> seem to generate anything special for Shift-Enter, just ^M. I guess
>> that's why it doesn't work with vim.
>>
>> I experimented on a Linux system, but I see that it behaves the same
>> in gvim on Windows.
>>
>> Is there some reason that this isn't documented, or am I just not
>> able to find it?
>
> I see similar to you: on Win32 and Linux gvim, it acts as ctrl+F with no
> signs of a mapping. Executing it in a file with "-W keystrokes.txt" on
> the command line shows that gvim is receiving the sequence "0x80 0xfc
> 0x02 0x0d" when shift+enter is pressed (in both Win32 and Linux gvims).
> The alternatives shown at ":help CTRL-F" shows shift+down (which
> sequences as "0x80 0xfd 05") and PageDown (which sequences as "0x80 0x6b
> 0x4e") as built-in. It is mappable in gvim with
>
> :inoremap <s-cr> hello
>
> In the terminals I use (xterm & rxvt), neither distinguishes <s-cr> from
> the plain <cr>.
>
> So I can't help explain it or point to it in the docs, but I can at
> least corroborate what you're seeing with a few more data-points.
>
> -tim
>
>
>
>
I see it too (on gvim 7.3.409 with GTK2/Gnome2 GUI on Linux-x86_64), and
I can't find it in the docs either. The fact that there's no trace of a
mapping shows that it's a built-in key binding. If it doesn't work in
console mode, it probably means that the console interface passes the
same code to Vim for Shift-Enter as it does for plain Enter.
And yes, it should be remappable as <S-CR> but of course only when Vim
can detect it. (A previous thread showed that <> symbols are
case-sensitive, at least in some cases: one user found that <Nop> was
the advertised do-nothing code but <nop> wasn't.)
Best regards,
Tony.
--
All of the true things I am about to tell you are shameless lies.
-- The Book of Bokonon / Kurt Vonnegut Jr.
--
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
No comments:
Post a Comment