Quantcast

backspace becomes ^? in putty

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

backspace becomes ^? in putty

Ed S. Peschko
hey all,

I just noticed that backspace becomes ^? in putty, at least
on vim version 6.3 on solaris 2.8, when the TERM is set
to xterm.

Is there any easy way around this, or is this really a bug?

Ed


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: backspace becomes ^? in putty

A.J.Mechelynck
Edward Peschko wrote:
> hey all,
>
> I just noticed that backspace becomes ^? in putty, at least
> on vim version 6.3 on solaris 2.8, when the TERM is set
> to xterm.
>
> Is there any easy way around this, or is this really a bug?
>
> Ed

Ctrl-? represents, IIUC, the "Del" character (0x7F).

See ":help :fixdel".


HTH,
Tony.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: backspace becomes ^? in putty

Ed S. Peschko
On Wed, May 25, 2005 at 11:49:26PM +0200, A. J. Mechelynck wrote:

> Edward Peschko wrote:
> > hey all,
> >
> > I just noticed that backspace becomes ^? in putty, at least
> > on vim version 6.3 on solaris 2.8, when the TERM is set
> > to xterm.
> >
> > Is there any easy way around this, or is this really a bug?
> >
> > Ed
>
> Ctrl-? represents, IIUC, the "Del" character (0x7F).
>
> See ":help :fixdel".

thanks, I thought there was an easy way around this..

However..

how do you make the backspace delete *backwards*? Using :fixdel,
it seems that the backspace key deletes forwards (ie: the character
under the cursor gets deleted, and all the *following* characters
shift backwards)

This is a slightly awkward way of doing things -
could the default be made to delete backwards instead of forwards?
And how do you change this?


Ed
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: backspace becomes ^? in putty

Collins, Kevin (MindWorks)
In reply to this post by Ed S. Peschko
Fix this in your putty settings. Under the Terminal -> Keyboard section,
there is block labelled "change the sequences sent by:" - the 1st one is
Backspace. It should be either Control-H or Control-?. Change it to the
opposite of what is currently set and it should work.

Kevin

-----Original Message-----
From: Edward Peschko [mailto:[hidden email]]
Sent: Wednesday, May 25, 2005 2:55 PM
To: A. J. Mechelynck
Cc: [hidden email]
Subject: Re: backspace becomes ^? in putty

On Wed, May 25, 2005 at 11:49:26PM +0200, A. J. Mechelynck wrote:

> Edward Peschko wrote:
> > hey all,
> >
> > I just noticed that backspace becomes ^? in putty, at least
> > on vim version 6.3 on solaris 2.8, when the TERM is set
> > to xterm.
> >
> > Is there any easy way around this, or is this really a bug?
> >
> > Ed
>
> Ctrl-? represents, IIUC, the "Del" character (0x7F).
>
> See ":help :fixdel".

thanks, I thought there was an easy way around this..

However..

how do you make the backspace delete *backwards*? Using :fixdel,
it seems that the backspace key deletes forwards (ie: the character
under the cursor gets deleted, and all the *following* characters
shift backwards)

This is a slightly awkward way of doing things -
could the default be made to delete backwards instead of forwards?
And how do you change this?


Ed


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: backspace becomes ^? in putty

A.J.Mechelynck
In reply to this post by Ed S. Peschko
Edward Peschko wrote:

> On Wed, May 25, 2005 at 11:49:26PM +0200, A. J. Mechelynck wrote:
>
>>Edward Peschko wrote:
>>
>>>hey all,
>>>
>>>I just noticed that backspace becomes ^? in putty, at least
>>>on vim version 6.3 on solaris 2.8, when the TERM is set
>>>to xterm.
>>>
>>>Is there any easy way around this, or is this really a bug?
>>>
>>>Ed
>>
>>Ctrl-? represents, IIUC, the "Del" character (0x7F).
>>
>>See ":help :fixdel".
>
>
> thanks, I thought there was an easy way around this..
>
> However..
>
> how do you make the backspace delete *backwards*? Using :fixdel,
> it seems that the backspace key deletes forwards (ie: the character
> under the cursor gets deleted, and all the *following* characters
> shift backwards)
>
> This is a slightly awkward way of doing things -
> could the default be made to delete backwards instead of forwards?
> And how do you change this?
>
>
> Ed
>
>
>

Read the text under ":help :fixdel", it also explains what to do when
":fixdel" alone doesn't work.

If you want me to help you get it right, please do the following:

1. Open Vim (over putty) with an empty buffer (i.e. [No File] or [No
Name] depending on version)
2. Hit i to get into Insert mode.
3. Press Ctrl-V followed by <BS> (or Ctrl-Q followed by <BS> if you use
Ctrl-V to paste).
4. Hopefully, one or more characters will be inserted into your empty
buffer. Place the cursor over each of them in turn, press ga (in Noraml
mode, not Insert mode) and write down the results.
5. Repeat steps 3 and 4 with <Del> instead of <BS>.
6. Tell the mailing list what you found out at steps 4 and 5.


Best regards,
Tony.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: backspace becomes ^? in putty

Ed S. Peschko
> If you want me to help you get it right, please do the following:
>
sure..


backspace:

        <^?> 127, Hex 7f, Octal 177

del:

<~> 126, Hex 7e, Octal 176
<3> 51,  Hex 33, Octal 063
<[> 91,  Hex 5b, Octal 133
<^[> 27,  Hex 1b, Octal 033

Ed
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: backspace becomes ^? in putty

A.J.Mechelynck
Edward Peschko wrote:

>>If you want me to help you get it right, please do the following:
>>
>
> sure..
>
>
> backspace:
>
> <^?> 127, Hex 7f, Octal 177
>
> del:
>
> <~> 126, Hex 7e, Octal 176
> <3> 51,  Hex 33, Octal 063
> <[> 91,  Hex 5b, Octal 133
> <^[> 27,  Hex 1b, Octal 033
>
> Ed

That ^[ (Escape) looks strange to me, but...

Well, unless you want to fix it outside of Vim (e.g., using the method
mentioned by Kevin Collins), and assuming that no other kind of terminal
used with console Vim names itself "xterm", you can add the following to
your vimrc:


        if ! has("gui_running")
                if &term == "xterm"
                        exe "set t_kD=~3[\033"
                        exe "set t_kB=\177"
                endif
        endif

If you have other flavours of "xterm", then you will have to find
something that Vim can test to determine if it is on a putty connection.


Best regards,
Tony.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: backspace becomes ^? in putty

Marcus Aurelius
In reply to this post by Ed S. Peschko

--- "A. J. Mechelynck" <[hidden email]> escreveu:

> Edward Peschko wrote:
> >>If you want me to help you get it right, please do the following:
> >>
> >
> > sure..
> >
> >
> > backspace:
> >
> > <^?> 127, Hex 7f, Octal 177
> >
> > del:
> >
> > <~> 126, Hex 7e, Octal 176
> > <3> 51,  Hex 33, Octal 063
> > <[> 91,  Hex 5b, Octal 133
> > <^[> 27,  Hex 1b, Octal 033
> >
> > Ed
>
> That ^[ (Escape) looks strange to me, but...

It's an escape sequence, it starts with Esc and ends with ~. I think the
command in the script below (3rd line) is reversed.

> Well, unless you want to fix it outside of Vim (e.g., using the method
> mentioned by Kevin Collins), and assuming that no other kind of terminal
> used with console Vim names itself "xterm", you can add the following to
> your vimrc:
>
>
> if ! has("gui_running")
> if &term == "xterm"
> exe "set t_kD=~3[\033"
> exe "set t_kB=\177"
> endif
> endif
>
> If you have other flavours of "xterm", then you will have to find
> something that Vim can test to determine if it is on a putty connection.
>
>
> Best regards,
> Tony.


       
       
               
____________________________________________________
Yahoo! Mail, cada vez melhor: agora com 1GB de espa?o gr?tis! http://mail.yahoo.com.br
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: backspace becomes ^? in putty

A.J.Mechelynck
Marcus Aurelius wrote:

> --- "A. J. Mechelynck" <[hidden email]> escreveu:
>
>>Edward Peschko wrote:
>>
>>>>If you want me to help you get it right, please do the following:
>>>>
>>>
>>>sure..
>>>
>>>
>>>backspace:
>>>
>>> <^?> 127, Hex 7f, Octal 177
>>>
>>>del:
>>>
>>><~> 126, Hex 7e, Octal 176
>>><3> 51,  Hex 33, Octal 063
>>><[> 91,  Hex 5b, Octal 133
>>><^[> 27,  Hex 1b, Octal 033
>>>
>>>Ed
>>
>>That ^[ (Escape) looks strange to me, but...
>
>
> It's an escape sequence, it starts with Esc and ends with ~. I think the
> command in the script below (3rd line) is reversed.

Ah, that seems more reasonable; in that case I suppose my third line
below must be replaced by

                        exe "set t_kD=\033[3~"

Best regards,
Tony.

>
>
>>Well, unless you want to fix it outside of Vim (e.g., using the method
>>mentioned by Kevin Collins), and assuming that no other kind of terminal
>>used with console Vim names itself "xterm", you can add the following to
>>your vimrc:
>>
>>
>> if ! has("gui_running")
>> if &term == "xterm"
>> exe "set t_kD=~3[\033"
>> exe "set t_kB=\177"
>> endif
>> endif
>>
>>If you have other flavours of "xterm", then you will have to find
>>something that Vim can test to determine if it is on a putty connection.
>>
>>
>>Best regards,
>>Tony.
>
>
>
>
>
>
> ____________________________________________________
> Yahoo! Mail, cada vez melhor: agora com 1GB de espa?o gr?tis! http://mail.yahoo.com.br
>
>
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: backspace becomes ^? in putty

Marian Csontos
In reply to this post by Ed S. Peschko
i had same problem, and setting function keys in PuTTY to ``linux'' solved  
it.
it sets $TERM to linux.

-- Marian


On Wed, 25 May 2005 23:11:45 +0200, Edward Peschko <[hidden email]> wrote:

> hey all,
>
> I just noticed that backspace becomes ^? in putty, at least
> on vim version 6.3 on solaris 2.8, when the TERM is set
> to xterm.
>
> Is there any easy way around this, or is this really a bug?
>
> Ed
>
>
>
>
> ________ Information from NOD32 ________
> This message was checked by NOD32 Antivirus System for Linux Mail Server.
> http://www.nod32.com
>
>
> __________ Informacia od NOD32 1.1108 (20050525) __________
>
> Tato sprava bola preverena antivirusovym systemom NOD32.
> http://www.eset.sk
>
>



--
Mgr. Mari?n Csontos
program?tor POS
AXA, a.s.
Radni?n? n?mestie 4
821 05 Bratislava
tel. +421 2 4829 4218
mailto:[hidden email]
www.axa.sk
 


________ Information from NOD32 ________
This message was checked by NOD32 Antivirus System for Linux Mail Server.
http://www.nod32.com
Loading...