delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/03/07/07:22:45

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <94c8464b1003070243n75c4d231i5d6ecd01bb903fbc@mail.gmail.com>
References: <94c8464b1003070243n75c4d231i5d6ecd01bb903fbc AT mail DOT gmail DOT com>
Date: Sun, 7 Mar 2010 12:22:33 +0000
Message-ID: <416096c61003070422l5258bacw7fa39b3e8ecd57bc@mail.gmail.com>
Subject: Re: About mode-dependent cursor
From: Andy Koppe <andy DOT koppe AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

hayate:
> When I use cygwin shell or mintty wrapper I want it like real term
> emulator in Linux.

There isn't a Cygwin shell as such. What happens is that bash (or
another shell) runs in a Windows console, whereby the Cygwin DLL
provides Unix terminal functionality for the console.

And mintty isn't a wrapper (for the console?). It's a terminal
emulator much like xterm, konsole, gnome-terminal or whatever, with
the difference that it uses the Windows API instead of X11 to draw its
user interface.


> That means: If I set shell to vi editing mode, the
> cursor would be a vertical line in inserting mode, and a block in a
> command mode.

Examples please. In particular, what shell were you using?

As I already pointed out on the mintty mailing list, mintty does
implement control sequences for switching cursor type, so you need to
find a way for your shell to emit those sequences when switching
editing mode. As far as I know, though, this can't be done in bash,
but it can in zsh, although I don't know how. The bash and zsh mailing
lists would be more likely to be able to help you with this.


> ps: I know there is a way to attend this in console Vim.

This can be done in mintty and xterm (with the appropriate bit of
magic in .vimrc), but afaik not in the Cygwin console, at least not
with the Cygwin version of vim. That's because the Cygwin console does
not implement the DECSCUSR control sequence for the purpose. (An
approximate implementation of DECSCUSR could be done using
SetConsoleCursorInfo).

Andy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019