Bug#348083: marked as done ("behave mswin" does not work on console)

Debian Bug Tracking System owner at bugs.debian.org
Sat Jan 14 18:48:16 UTC 2006


Your message dated Sat, 14 Jan 2006 19:38:08 +0100
with message-id <200601141938.08668.pierre.habouzit at m4x.org>
and subject line Bug#348083: "behave mswin" does not work on console
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 14 Jan 2006 16:45:58 +0000
>From expires-2006 at venthur.de Sat Jan 14 08:45:58 2006
Return-path: <expires-2006 at venthur.de>
Received: from pd9537f34.dip.t-dialin.net ([217.83.127.52] helo=localhost.localdomain)
	by spohr.debian.org with esmtp (Exim 4.50)
	id 1ExoXO-0006SS-76
	for submit at bugs.debian.org; Sat, 14 Jan 2006 08:45:58 -0800
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Bastian Venthur <expires-2006 at venthur.de>
To: Debian Bug Tracking System <submit at bugs.debian.org>
Subject: "behave mswin" does not work on console
Message-ID: <20060114164606.9764.37513.reportbug at localhost.localdomain>
X-Mailer: reportbug 3.18
Date: Sat, 14 Jan 2006 17:46:06 +0100
X-Debbugs-Cc: expires-2006 at venthur.de
Delivered-To: submit at bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-8.8 required=4.0 tests=BAYES_00,FROM_ENDS_IN_NUMS,
	HAS_PACKAGE,RCVD_IN_SORBS,X_DEBBUGS_CC autolearn=ham 
	version=2.60-bugs.debian.org_2005_01_02

Package: vim
Version: 1:6.4-006+1
Severity: normal

With the line:

source $VIMRUNTIME/mswin.vim

in your .vimrc the command "behave mswin" gets executed. And you should
be able to enter the visual mode by pressing SHIFT-ARROW (like in every
other modern editor).

But this does not work with vim under a console (neither KDE-Konsole nor
plain Linux console). But under gvim the selection works as expected.

I've googled around and did not find a reason (or hint) why ms-style
selection works with gvim but not with "plain" vim.




-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-2-686-smp
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)

Versions of packages vim depends on:
ii  libc6                        2.3.5-11    GNU C Library: Shared libraries an
ii  libgpmg1                     1.19.6-21   General Purpose Mouse - shared lib
ii  libncurses5                  5.5-1       Shared libraries for terminal hand
ii  vim-common                   1:6.4-006+1 Vi IMproved - Common files
ii  vim-runtime                  1:6.4-006+1 Vi IMproved - Runtime files

vim recommends no packages.

-- no debconf information

---------------------------------------
Received: (at 348083-done) by bugs.debian.org; 14 Jan 2006 18:37:43 +0000
>From pierre.habouzit at m4x.org Sat Jan 14 10:37:43 2006
Return-path: <pierre.habouzit at m4x.org>
Received: from smtp1-g19.free.fr ([212.27.42.27])
	by spohr.debian.org with esmtp (Exim 4.50)
	id 1ExqHX-0005vp-9w
	for 348083-done at bugs.debian.org; Sat, 14 Jan 2006 10:37:43 -0800
Received: from hades.madism.org (olympe.madism.org [82.225.205.10])
	by smtp1-g19.free.fr (Postfix) with ESMTP id 77F6C6E40E;
	Sat, 14 Jan 2006 19:37:41 +0100 (CET)
From: Pierre Habouzit <pierre.habouzit at m4x.org>
Organization: Polytechnique.org
Subject: Re: Bug#348083: "behave mswin" does not work on console
Date: Sat, 14 Jan 2006 19:38:08 +0100
User-Agent: KMail/1.9.1
Cc: Bastian Venthur <expires-2006 at venthur.de>,
 348083-done at bugs.debian.org
References: <20060114164606.9764.37513.reportbug at localhost.localdomain> <200601141852.11578.pierre.habouzit at m4x.org> <200601141921.31564.expires-2006 at venthur.de>
In-Reply-To: <200601141921.31564.expires-2006 at venthur.de>
X-Face: $(^e[V4D-[`f2EmMGz at fgWK!e.B~2g.{08lKPU(nc1J~z\4B>*JEVq:E]7G-\6$Ycr4<;Z!|VY6Grt]+RsS$IMV)f>2)M="tY:ZPcU;&%it2D81X^kNya0=L]"vZmLP+UmKhgq+u*\.dJ8G!N&=EvlD
MIME-Version: 1.0
Content-Type: multipart/signed;
  boundary="nextPart2329290.8LCMsZZQgN";
  protocol="application/pgp-signature";
  micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
To: Undisclosed.Recipients: ;
Message-Id: <200601141938.08668.pierre.habouzit at m4x.org>
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-5.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_SORBS autolearn=no version=2.60-bugs.debian.org_2005_01_02

--nextPart2329290.8LCMsZZQgN
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline


> Are you sure? It does not even work under a plain linux login (no
> x-server started).

given the fact that linux consoles are terminals ...
a terminal is NOT a graphical application. terminal is a Unix concept.=20
Calling xterm or konsole a terminal is in fact a language abuse. those=20
should be called graphical terminal emulators, and the linux one is=20
also known as a 'virtual terminal emulator aka vte'. but it's a bit=20
hard to say, so pple just use terminal.

> Surprisingly it works fine under gvim.

because key mappings are sent to gvim through X protocol and not through=20
the terminal escape sequences (which is a complete mess).

> Hmm in order to reproduce your solution I've installed xterm and
> noted SHIFT-RIGHT under vim under xtmrm *removes* lines in insert
> mode (before and after set t_%i...).

because I didn't explain it clearly.

set t_%i=3D^[[1;2C

the ^[ has to be created typing '^V^[' and that should print ^[ in blue.

if you do that and retest the ^K<S-Right>, you'll see <S-Right>.

to know what a key sequence do, under zsh (maybe under bash too) in the=20
term that you want to test, type :

^V[your key sequence]

if nothing show up, then it's that the terminal you are using does not=20
send anything to the application that runs under it.

e.g. in konsole :
 * ^V<S-Right> does nothing
 * ^V<Right> does ^[[C
 * ^V<PageUp> does ^[[5

in xterm :
 * ^V<S-Right> does ^[[1;C
 * ^V<Right> does ^[[C
 * ^V<PageUp> does ^[[5

in my linux console :
 * ^V<S-Right> does ^[[C
 * ^V<Right> does ^[[C
 * ^V<PageUp> does ^[[5

so in the linux console, Shift-Right is not recognized.
that's exaclty the reason why vim does not uses shift-right by default=20
as it's clearly explained in :help term.txt (please READ it carefully=20
before any further questions). terminals are all different, and some=20
just don't know some escape sequences.

So your choice is between learning to use vi bindings, using vim in=20
xterm with some tweaks in your vimrc (a lot of set t_* presumably) or=20
to use the gui version.


Since the behaviour is documented in the vim help, It's no bug, and I'll=20
close it.
=2D-=20
=C2=B7O=C2=B7  Pierre Habouzit
=C2=B7=C2=B7O                                                madcoder at debia=
n.org
OOO                                                http://www.madism.org

--nextPart2329290.8LCMsZZQgN
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQBDyUUQvGr7W6HudhwRAolxAJ9owU+a/K0XQeksw3kbEPrzEvQ8aQCeKp2a
VOo8rJmxWtp1CKOGcdhy+QA=
=tQFw
-----END PGP SIGNATURE-----

--nextPart2329290.8LCMsZZQgN--



More information about the pkg-vim-maintainers mailing list