Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Changing the shape of the cursor.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  15 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
André Scholz  
View profile  
 More options Mar 28 2009, 8:02 am
From: André Scholz <andre.sch...@mathematik.tu-chemnitz.de>
Date: Sat, 28 Mar 2009 13:02:01 +0100
Local: Sat, Mar 28 2009 8:02 am
Subject: Changing the shape of the cursor.
Hello,

as many others, i was interested in changing the cursor shape. For KDE4
and GNOME i found these solutions:

In KDE4 : Put

<code>
  let &t_SI = "\<Esc>]50;CursorShape=1\x7"
  let &t_EI = "\<Esc>]50;CursorShape=0\x7"
</code>

into your vimrc.

In GNOME 2.26 : Put

<code>
if has("autocmd")
  au InsertEnter * silent execute "!gconftool-2 --type string
--set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam"

  au InsertLeave * silent execute "!gconftool-2 --type string
--set /apps/gnome-terminal/profiles/Default/cursor_shape block"

  au VimLeave * silent execute "!gconftool-2 --type string
--set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam"
endif
</code>

into your vimrc. (In case they get wrapped in this post: these are five
lines.) If you use more than one profile in gnome-terminal, you might
have to tweak this a little.

Have a nice day,
André


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kazuo Teramoto  
View profile  
 More options Mar 29 2009, 3:41 pm
From: Kazuo Teramoto <kaz....@gmail.com>
Date: Sun, 29 Mar 2009 16:41:48 -0300
Local: Sun, Mar 29 2009 3:41 pm
Subject: Re: Changing the shape of the cursor.
I have a working solution for urxvt (using a |-cursor shape, but you
lose the underline cursor for a | cursor, or you can use a _ cursor)
if someone want it send me a mail and I put it all together tomorrow.

--
«Dans la vie, rien n'est à craindre, tout est à comprendre»
Marie Sklodowska Curie.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
André Scholz  
View profile  
 More options Mar 30 2009, 1:51 pm
From: André Scholz <andre.sch...@mathematik.tu-chemnitz.de>
Date: Mon, 30 Mar 2009 19:51:07 +0200
Local: Mon, Mar 30 2009 1:51 pm
Subject: Re: Changing the shape of the cursor.
I wrote a wiki entry at

http://vim.wikia.com/wiki/Change_cursor_shape_in_different_modes

Maybe you can add urxvt to it.

Have a nice day.
André


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Wozniski  
View profile  
 More options Mar 30 2009, 8:20 pm
From: Matt Wozniski <m...@drexel.edu>
Date: Mon, 30 Mar 2009 20:20:44 -0400
Local: Mon, Mar 30 2009 8:20 pm
Subject: Re: Changing the shape of the cursor.

On Sat, Mar 28, 2009 at 8:02 AM, André Scholz wrote:

> Hello,

> as many others, i was interested in changing the cursor shape. For KDE4
> and GNOME i found these solutions:

> In KDE4 : Put

> <code>
>  let &t_SI = "\<Esc>]50;CursorShape=1\x7"
>  let &t_EI = "\<Esc>]50;CursorShape=0\x7"
> </code>

> into your vimrc.

That won't play nicely with gnu screen, or with dvtm, or any of the
other terminal multiplexers out there...

Unless I'm misunderstanding something, this would not only work
improperly when combined with tools like screen and dvtm, but also -
when you have multiple terminals open it would change the cursor shape
in all of them!

~Matt


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Greg  
View profile  
 More options Apr 2 2009, 9:11 am
From: Greg <g...@easyflirt.com>
Date: Thu, 02 Apr 2009 15:11:36 +0200
Local: Thurs, Apr 2 2009 9:11 am
Subject: Re: Changing the shape of the cursor.
André Scholz a écrit :

> I wrote a wiki entry at

> http://vim.wikia.com/wiki/Change_cursor_shape_in_different_modes

> Maybe you can add urxvt to it.

Thank you!
Any solution for konsole KDE3 ? none works :-/

--
Greg


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Beckett  
View profile  
 More options Apr 2 2009, 6:58 pm
From: "John Beckett" <johnb.beck...@gmail.com>
Date: Fri, 3 Apr 2009 09:58:53 +1100
Local: Thurs, Apr 2 2009 6:58 pm
Subject: RE: Changing the shape of the cursor.

Greg wrote:
>> http://vim.wikia.com/wiki/Change_cursor_shape_in_different_modes

> Thank you!
> Any solution for konsole KDE3 ? none works :-/

That reminds me ... I just added Matt's comments to the tip,
where he says it will give trouble with screen and dvtm.

Please update the tip with any developments.

John


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Wozniski  
View profile  
 More options Apr 3 2009, 2:09 am
From: Matt Wozniski <m...@drexel.edu>
Date: Fri, 3 Apr 2009 02:09:32 -0400
Local: Fri, Apr 3 2009 2:09 am
Subject: Re: Changing the shape of the cursor.

On Thu, Apr 2, 2009 at 6:58 PM, John Beckett <johnb.beck...@gmail.com> wrote:

> Greg wrote:
>>> http://vim.wikia.com/wiki/Change_cursor_shape_in_different_modes

>> Thank you!
>> Any solution for konsole KDE3 ? none works :-/

> That reminds me ... I just added Matt's comments to the tip,
> where he says it will give trouble with screen and dvtm.

> Please update the tip with any developments.

And that reminds *me*... unless I'm mistaken, both the gnome-terminal
tip and the konsole tip will have problems with multiple tabs.

~Matt


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dots  
View profile  
 More options Apr 7 2009, 5:18 am
From: dots <d...@y7mail.com>
Date: Tue, 7 Apr 2009 02:18:31 -0700 (PDT)
Local: Tues, Apr 7 2009 5:18 am
Subject: Re: Changing the shape of the cursor.
what is the `control sequence' or `terminfo' to change the curosr
shape in gnome-terminal?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pansz  
View profile  
 More options Apr 7 2009, 7:49 am
From: pansz <panshi...@routon.com>
Date: Tue, 07 Apr 2009 19:49:18 +0800
Local: Tues, Apr 7 2009 7:49 am
Subject: Re: Changing the shape of the cursor.
André Scholz 写道:

> Hello,

> as many others, i was interested in changing the cursor shape. For KDE4
> and GNOME i found these solutions:

> In KDE4 : Put

> In GNOME 2.26 : Put

As we know KDE and GNOME are two most popular Linux desktop environments
and the terminal emulator included is there.

However, I use different computers, they have KDE or GNOME, and I often
need to use vim in remote ssh sessions, such as open the GNOME terminal
locally and ssh to a remote computer which has KDE.

Any one knows how to check in .vimrc whether I'm in KDE4 Konsole or in
GNOME terminal in a remote ssh session?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pansz  
View profile  
 More options Apr 7 2009, 7:56 am
From: pansz <panshi...@routon.com>
Date: Tue, 07 Apr 2009 19:56:29 +0800
Local: Tues, Apr 7 2009 7:56 am
Subject: Re: Changing the shape of the cursor.
Matt Wozniski 写道:

> On Sat, Mar 28, 2009 at 8:02 AM, André Scholz wrote:
>> Hello,
>> In KDE4 : Put
> That won't play nicely with gnu screen, or with dvtm, or any of the
> other terminal multiplexers out there...

That's not a big problem for gnu screen, since we've got &term=='screen'
in screen and &term=='xterm' in konsole. I can enable the sequences only
for &term=='xterm'.

The problem is: too many terminal emulators claims to be &term=='xterm'
while they are not identical. It would be much better if there's a way
to know the exact terminal emulator program name in .vimrc.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dennis Benzinger  
View profile  
 More options Apr 7 2009, 7:55 am
From: Dennis Benzinger <Dennis.Benzin...@gmx.net>
Date: Tue, 07 Apr 2009 13:55:05 +0200
Local: Tues, Apr 7 2009 7:55 am
Subject: Re: Changing the shape of the cursor.
Hi!

Am 07.04.2009 13:49, pansz schrieb:

> [...]
> Any one knows how to check in .vimrc whether I'm in KDE4 Konsole or in
> GNOME terminal in a remote ssh session?
> [...]

I don't know if it works with SSH put you can query the COLORTERM
environment variable:

:echo $COLORTERM

Gnome Terminal sets it to gnome-terminal. I don't know what Konsole does.

HTH,
Dennis Benzinger


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Wozniski  
View profile  
 More options Apr 7 2009, 8:31 am
From: Matt Wozniski <m...@drexel.edu>
Date: Tue, 7 Apr 2009 08:31:51 -0400
Local: Tues, Apr 7 2009 8:31 am
Subject: Re: Changing the shape of the cursor.

On Tue, Apr 7, 2009 at 7:56 AM, pansz wrote:

> Matt Wozniski 写道:
>> On Sat, Mar 28, 2009 at 8:02 AM, André Scholz wrote:
>>> Hello,
>>> In KDE4 : Put
>> That won't play nicely with gnu screen, or with dvtm, or any of the
>> other terminal multiplexers out there...

> That's not a big problem for gnu screen, since we've got &term=='screen'
> in screen and &term=='xterm' in konsole. I can enable the sequences only
> for &term=='xterm'.

Well, as I said later, it also might not play nicely with multiple
tabs, or even multiple terminals (at least, the suggest gnome-terminal
version wouldn't, not sure about the suggested konsole version).

> The problem is: too many terminal emulators claims to be &term=='xterm'
> while they are not identical. It would be much better if there's a way
> to know the exact terminal emulator program name in .vimrc.

Set up the terminal emulator to send something more correct; any sane
terminal emulator should let you.  It's perfectly common to set up
xterm to set TERM=xterm-256color, to set up konsole to set
TERM=konsole-256color, to set up screen to set TERM=screen-256color,
etc...  Unfortunately, to the best of my knowledge gnome-terminal
fails this sanity test - I know of no way to get it to set $TERM to
the correct value (gnome-256color) without patching the source and
recompiling.

~Matt


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tony Mechelynck  
View profile  
 More options Apr 7 2009, 7:26 pm
From: Tony Mechelynck <antoine.mechely...@gmail.com>
Date: Wed, 08 Apr 2009 01:26:11 +0200
Local: Tues, Apr 7 2009 7:26 pm
Subject: Re: Changing the shape of the cursor.
On 07/04/09 13:55, Dennis Benzinger wrote:

On my system it doesn't set it. Anyway, I suppose that a value of
"gnome-terminal" would be rather characteristic. Remains to be seen how
to tell xterm apart from konsole. From v:termresponse maybe? Let's see
what I get:

konsole...             ^[[0;115;0c
xterm...               ^[[0;236;0c
gnome-terminal...      ^[[1;1704;0c

(where the initial ^[ is an "escape" character) so the results are
indeed different, but I don't think the criterion can be ported to an
unknown system (I mean, you need to make the experiment separately for
each installation -- and it may change if you upgrade one of these
packages).

Best regards,
Tony.
--
If God is perfect, why did He create discontinuous functions?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pansz  
View profile  
 More options Apr 7 2009, 9:25 pm
From: pansz <panshi...@routon.com>
Date: Wed, 08 Apr 2009 09:25:53 +0800
Local: Tues, Apr 7 2009 9:25 pm
Subject: Re: Changing the shape of the cursor.
Tony Mechelynck 写道:

> On my system it doesn't set it. Anyway, I suppose that a value of
> "gnome-terminal" would be rather characteristic. Remains to be seen how
> to tell xterm apart from konsole. From v:termresponse maybe? Let's see
> what I get:

> konsole...             ^[[0;115;0c
> xterm...               ^[[0;236;0c
> gnome-terminal...      ^[[1;1704;0c

> (where the initial ^[ is an "escape" character) so the results are
> indeed different, but I don't think the criterion can be ported to an
> unknown system

It seems work, but we may need to do some regexp matching...
Let's see what I get:

  konsole1...            ^[[0;115;0c
  konsole2...            ^[[0;115;0c
  xterm...               ^[[0;239;0c
  gnome-terminal...      ^[[1;1613;0c
  xfce4-terminal...      ^[[1;1613;0c
  screen...              (nothing)

So the number may not be exactly the same, while we should tell
differences between konsole and gnome-terminal anyway. While the konsole
in KDE3 and KDE4 returns the same value, which is somewhat undesirable.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas Dickey  
View profile  
 More options Apr 8 2009, 7:27 am
From: Thomas Dickey <dic...@his.com>
Date: Wed, 8 Apr 2009 04:27:16 -0700 (PDT)
Local: Wed, Apr 8 2009 7:27 am
Subject: Re: Changing the shape of the cursor.
On Apr 7, 9:25 pm, pansz <panshi...@routon.com> wrote:

The 115 was copied from one of xterm's strings.
gnome terminal copied it around the same time, but
at a later point added a digit.  Since then, the
trail's grown indistinct (gnome developers as a
matter of practice, do not document their changes
very well ;-)

>  xterm...               ^[[0;239;0c
>   gnome-terminal...      ^[[1;1613;0c
>   xfce4-terminal...      ^[[1;1613;0c
>   screen...              (nothing)

> So the number may not be exactly the same, while we should tell
> differences between konsole and gnome-terminal anyway. While the konsole
> in KDE3 and KDE4 returns the same value, which is somewhat undesirable.

The "1" in gnome-terminal's response would claim that
it emulates a vt220.  It only implements enough of
a subset to be a nuisance when one tries to use it
as a vt220 (on VMS for instance).  One of gnome-terminal's
bug reports pointed that out, and the advice given there
was to change the response to fix the bug.  (The developer
failed to comprehend the advice - it's apparent in his
response ;-).

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »