[Feisty] problems with vim and shortcuts

Bug #91468 reported by x
2
Affects Status Importance Assigned to Milestone
GNOME Terminal
Invalid
Unknown
gnome-terminal (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: vim-full

I have vim-full installed:

$ aptitude show vim-full
Package: vim-full
State: installed
Automatically installed: no
Version: 1:7.0-164+1ubuntu6

In my .vimrc i have the following keymapping:
<--------------------------------------------------------
" The paste option is intended for invoking temporarily while pasting in text.
" It avoids things like autoindent causing "stepped" text. This defines the
" \tp ("toggle paste") mapping, also set to <S-F4> in both normal and insert
" mode:
nnoremap \tp :set invpaste paste?<CR>
nmap <S-F4> \tp
imap <S-F4> <C-O>\tp
set pastetoggle=<S-F4>
-------------------------------------------------------->

But instead of setting vim into paste mode it enters "1;2S" at cursor position.

After playing a little i found out:

<S-F5><S-F6><S-F7><S-F8><S-F9><S-F11><S-F12>
These work as expected.

But shift+F1 produces 1;2P
shift+F2 produces 1;2Q
shift+F3 produces 1;2R
shift+F4 produces 1;2S

any idea how to stop this?

Revision history for this message
x (xk2c-deactivatedaccount) wrote :

sorry the above version information is outdated, actually i have:

$ aptitude show vim-full
Package: vim-full
State: installed
Automatically installed: no
Version: 1:7.0-164+1ubuntu7

but still the same

Revision history for this message
x (xk2c-deactivatedaccount) wrote :

when i set the shortcut from <S-F4> to <F4> it works as expected

Revision history for this message
Christof Krüger (christofkr) wrote :

I don't think this is a bug in vim. It should work when using gvim.

Instead, it might have something to do with gnome-terminal or xterm simulating F13 through F16 by Shift-F1 through Shift-F4. However, you could just change your mappings to whatever Ctrl-V followed by pressing shift-F4 returns.

Revision history for this message
x (xk2c-deactivatedaccount) wrote :

Thanks for your input, since i am really stuck on this.

After testing a little it seems you are right. in konsole (kde) everything works as desired.

so what can we do about it?

Revision history for this message
x (xk2c-deactivatedaccount) wrote :

additional information:
even konsole opened inside gnome does it right.

So is it a gnome-terminal thing?

Revision history for this message
Christof Krüger (christofkr) wrote :

I think I can't really help you here since I don't know what kind of terminal gnome-terminal tries to emulate. So this behavior could be fully intended or this could be a bug. Who knows...
You could try filing a bug on gnome-terminal upstream (http://bugzilla.gnome.org) and find out.

Revision history for this message
x (xk2c-deactivatedaccount) wrote :
Changed in gnome-terminal:
status: Unknown → Unconfirmed
Revision history for this message
Paulo Zanoni (pzanoni) wrote :

additional information:

open gnome-terminal
open vim
type a few words
press shift+arrow_left or shift+arrow_right
instead of skipping a word it will write:
1;2D (For shift+arrow_left)
and
1;2C (for shift+arrow_right)
shift+arrow_up and shift+arrow_down are also bugged.

Revision history for this message
x (xk2c-deactivatedaccount) wrote :

setting bugstatus to confirmed

Changed in gnome-terminal:
status: Unconfirmed → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

the bug looks somewhat similar to bug #96676

Revision history for this message
x (xk2c-deactivatedaccount) wrote :

Yes it seems to be caused from the same source.

Should we mark it as dup then (we have upstream bugs in both bugreports) ?

Revision history for this message
Sebastien Bacher (seb128) wrote :

maybe let upstream decide if they consider it as a duplicate or not

Changed in gnome-terminal:
status: Unconfirmed → Confirmed
Revision history for this message
x (xk2c-deactivatedaccount) wrote :

upstream update:
------------------------------------------------

This seems to work for me now. Fixed?
.
.
.
Same here, but I forgot to report back here ... sorry. :-/

Seems like it was a vte bug after all, as gnome-terminal-2.18.1 didn't fix it,
but the latest vte-0.16.8 did - yeah! Upgrading to vte-0.16.8 brought back the
Ctrl+Up/Down/Left/Right functionality in mc immediately, and the Shift-Fn
function keys also worked again after relearning them in mc (F9 -> Options ->
Learn Keys).

Big thanks to whoever found and fixed that annoying bug - gnome-terminal is now
finally usable again with mc! :-)
------------------------------------------------

as it seems in vte-0.16.8 the bug is solved.
If i am not wrong that´s the version in gutsy.

currently no working gutsy here - can someone confirm?

Revision history for this message
Sebastien Bacher (seb128) wrote :

is that a duplicate of bug #89660?

Revision history for this message
x (xk2c-deactivatedaccount) wrote :

Yes ( the upstream bugreport the both launchpad bugs are connected to, are the same #418732 @ gnme.org)

Thank you for ponting to this report - i will check the backported/updated packages for feisty to see if they solve it here.

Revision history for this message
x (xk2c-deactivatedaccount) wrote :

I have installed:

$ aptitude show libvte-common | grep -A 2 "State: installed"
State: installed
Automatically installed: no
Version: 1:0.16.8-0ubuntu1~7.04prevu1

$ aptitude show libvte9 | grep -A 2 "State: installed"
State: installed
Automatically installed: no
Version: 1:0.16.8-0ubuntu1~7.04prevu1

$ aptitude show python-vte | grep -A 2 "State: installed"
State: installed
Automatically installed: no
Version: 1:0.16.8-0ubuntu1~7.04prevu1

from those repo mentioned in #89660.

But Shift+F1 inside vim still gives: 1;2P

so those packages doesn´t solve it.
(...and i am trying to get rid of them now...)

Revision history for this message
x (xk2c-deactivatedaccount) wrote :

the packges from both repos mentioned in #89660 doesn´t work here.

Changed in gnome-terminal:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.