vim undo (was Re: remote [ssh] Backspace] key gives me "^?")

2007-09-17 Thread N.J. Thomas
* Gary Kline <[EMAIL PROTECTED]> [2007-09-16 19:29:08 -0700]:
> There are Lots of thing I like about vim, but after having fouled up
> with the undo's and lost some critical writing or code, I went back to
> what I've usedsince Bill Joy pointed me at vi.

Presumably, you are talking about vi's (and vim's) habit of writing over
changes that have been undone.

This problem has been nullified in Vim 7 by the addition of undo
branches. You can now go back to the text after any change -- even if
they were undone.

Another nice thing is that changes are also now timestamped. You can go
backward/forwawrd in time in the buffer (e.g. ":earlier 10m" goes to the
text as it was ten minutes earlier).

hth,
Thomas

-- 
N.J. Thomas
[EMAIL PROTECTED]
Etiamsi occiderit me, in ipso sperabo
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: remote [ssh] Backspace] key gives me "^?"

2007-09-17 Thread Jordan Gordeev

Gary Kline wrote:

On Sat, Sep 15, 2007 at 02:31:40PM -0600, Chad Perrin wrote:


On Sun, Sep 16, 2007 at 08:40:00PM +0300, Jordan Gordeev wrote:


Gary Kline wrote:


	I find that if I use Settings -> Keyboard and then select 
	"FreeBSD Console", I come fairly close.  Then [Backspace] 
	backs up, but the characters are not erased as I space 
	backways.  UsingTerminal, it defaults to this.


Characters are not erased for me when I hit backspace in vi. In vim, 
they are.


Yeah . . . I'm pretty sure that's normal behavior for vi/nvi.  Using
backspace, then hitting  to return to command mode, might cause the
backspace text to disappear.  Typing after backspacing might overwrite
the backspaced text without having to leave insert mode, too.  I'm going
on memory, here, and may be mistaken -- I didn't use nvi for very long
before going back to Vim.





There are Lots of thing I  like about vim, but after having
fouled up with the undo's and lost some critical writing or code,
I went back to what I've usedsince Bill Joy pointed me at vi.

vi only takes ONE hand, emacs takesat least 8 hands and a few
spare thumbs!!!

gary



Vim's undo can behave like vi's. Try ":help undo" or ":help compatible".
How do you manage to use vi with only one hand? I need two :-)


--
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
W. Somerset Maugham: "The ability to quote is a serviceable substitute for
wit."
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"





___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: remote [ssh] Backspace] key gives me "^?"

2007-09-16 Thread Gary Kline
On Sat, Sep 15, 2007 at 02:31:40PM -0600, Chad Perrin wrote:
> On Sun, Sep 16, 2007 at 08:40:00PM +0300, Jordan Gordeev wrote:
> > Gary Kline wrote:
> > 
> > >   I find that if I use Settings -> Keyboard and then select 
> > >   "FreeBSD Console", I come fairly close.  Then [Backspace] 
> > >   backs up, but the characters are not erased as I space 
> > >   backways.  UsingTerminal, it defaults to this.
> > Characters are not erased for me when I hit backspace in vi. In vim, 
> > they are.
> 
> Yeah . . . I'm pretty sure that's normal behavior for vi/nvi.  Using
> backspace, then hitting  to return to command mode, might cause the
> backspace text to disappear.  Typing after backspacing might overwrite
> the backspaced text without having to leave insert mode, too.  I'm going
> on memory, here, and may be mistaken -- I didn't use nvi for very long
> before going back to Vim.
> 


There are Lots of thing I  like about vim, but after having
fouled up with the undo's and lost some critical writing or code,
I went back to what I've usedsince Bill Joy pointed me at vi.

vi only takes ONE hand, emacs takesat least 8 hands and a few
spare thumbs!!!

gary



> -- 
> CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
> W. Somerset Maugham: "The ability to quote is a serviceable substitute for
> wit."
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"

-- 
  Gary Kline  [EMAIL PROTECTED]   www.thought.org  Public Service Unix
  http://jottings.thought.org   http://transfinite.thought.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: remote [ssh] Backspace] key gives me "^?"

2007-09-16 Thread Gary Kline
On Sun, Sep 16, 2007 at 08:40:00PM +0300, Jordan Gordeev wrote:
> Gary Kline wrote:
> >On Fri, Sep 14, 2007 at 07:12:04PM -0600, Chad Perrin wrote:
> >
> >>On Sat, Sep 15, 2007 at 01:28:22PM -0700, Gary Kline wrote:
> >>
> >>>   Trying to use stty failed... .
> >>
> >>What terminal emulator are you using?  It may be that, as was the case
> >>with me when I was using aterm, I needed to use stty *and* needed to
> >>change a configuration in the aterm makefile.  It's possible that stty
> >>alone won't do it, but stty in combination with something else *will*.
> >>
> >
> >
> > Sounds entirely rational.  Because here and with CTWM I have
> > simple xterms; on my "new tao" runnning Gnome as a manager, I use
> > Konsole.  Entrely to get the BEL in vi/nvi.  
>   
> Are you getting audiable bell in vi/nvi when using xterm? I think I 
> didn't get that last sentence.
> >

No.  For some reason, when I use Gnome or KDE, the system speaker
goes dead.  Hitting ESC in nvi does not work, and because I only
watch the keyboard and not te screen, I rely on the audio
feedback.   (I used to use Suns at work and turned on "click" to
make certain that I actually hit a key.   It drove my co-workers
batty, but that was just until we moved into offices!)  Nutshell,
I will either buy a fancyy clicky keyboard or write a CLICK
Driver.Meanehile, unless I set Konsole to ring the WAV belll,
no *ding*.


> 
> > I find that if I use Settings -> Keyboard and then select 
> > "FreeBSD Console", I come fairly close.  Then [Backspace] 
> > backs up, but the characters are not erased as I space 
> > backways.  UsingTerminal, it defaults to this.
> Characters are not erased for me when I hit backspace in vi. In vim, 
> they are.
> 
Zounds! same here.  I'm working in my old tao running ctwm, and
yup, same thing with vi/nvi.  vim does erase.  '\b' ' ' '\b'
was how I coded it tone time.  The thing I don't like about vim
is that I foul up with 'u' undo's.  Is there some magic to makr
vim behave more like the old vi?  Hmph!

> >
> > Anther indicator thata Garrett is right is that by doing an
> > "ssh -X tao", X gives me 
> >
> >X Error of failed request:  BadAccess (attempt to access private resource 
> >denied)
> >  Major opcode of failed request:  100 (X_ChangeKeyboardMapping)
> >  Serial number of failed request:  7
> >  Current serial number in output stream:  12
> >q3 20:06  [5032] 
> >
> >
> > If this gives annybody a clue, I'd be much obliged for some
> > insights.  .
> 
> 
> Would you please try running "stty erase '^H' erase2 '^?'" in Konsole 
> with default terminal settings and tell me how it behaves?
> >


Well, in the dfault mode with keyboard == Xterm 4, it backs up
and erases in command-ln mode, but both vi and vi still run into
the "^?" characters.  Even given  you stty cms.  However, if I
set the keyboard to "freebsd", the first in the list, it erases 
wit bakspace.   In vi, tho, as you noted above, it does not
blank the character; in vim it both backs up then forward to
blank, then backwards.

(Be nice to understand what's going on without days of digging
into the code!)


gary




> > gary
> >
> >
> > 
> >
> >>-- 
> >>CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
> >>Brian K. Reid: "In computer science, we stand on each other's feet."
> >>___
> >>freebsd-questions@freebsd.org mailing list
> >>http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> >>To unsubscribe, send any mail to 
> >>"[EMAIL PROTECTED]"
> >
> >
> 
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"

-- 
  Gary Kline  [EMAIL PROTECTED]   www.thought.org  Public Service Unix
  http://jottings.thought.org   http://transfinite.thought.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: remote [ssh] Backspace] key gives me "^?"

2007-09-16 Thread Chad Perrin
On Sun, Sep 16, 2007 at 08:40:00PM +0300, Jordan Gordeev wrote:
> Gary Kline wrote:
> 
> > I find that if I use Settings -> Keyboard and then select 
> > "FreeBSD Console", I come fairly close.  Then [Backspace] 
> > backs up, but the characters are not erased as I space 
> > backways.  UsingTerminal, it defaults to this.
> Characters are not erased for me when I hit backspace in vi. In vim, 
> they are.

Yeah . . . I'm pretty sure that's normal behavior for vi/nvi.  Using
backspace, then hitting  to return to command mode, might cause the
backspace text to disappear.  Typing after backspacing might overwrite
the backspaced text without having to leave insert mode, too.  I'm going
on memory, here, and may be mistaken -- I didn't use nvi for very long
before going back to Vim.

-- 
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
W. Somerset Maugham: "The ability to quote is a serviceable substitute for
wit."
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: remote [ssh] Backspace] key gives me "^?"

2007-09-16 Thread Jordan Gordeev

Gary Kline wrote:

On Fri, Sep 14, 2007 at 07:12:04PM -0600, Chad Perrin wrote:


On Sat, Sep 15, 2007 at 01:28:22PM -0700, Gary Kline wrote:


Trying to use stty failed... .


What terminal emulator are you using?  It may be that, as was the case
with me when I was using aterm, I needed to use stty *and* needed to
change a configuration in the aterm makefile.  It's possible that stty
alone won't do it, but stty in combination with something else *will*.




Sounds entirely rational.  Because here and with CTWM I have
simple xterms; on my "new tao" runnning Gnome as a manager, I use
	Konsole.  Entrely to get the BEL in vi/nvi.  

  
Are you getting audiable bell in vi/nvi when using xterm? I think I 
didn't get that last sentence.




	I find that if I use Settings -> Keyboard and then select 
	"FreeBSD Console", I come fairly close.  Then [Backspace] 
	backs up, but the characters are not erased as I space 
	backways.  UsingTerminal, it defaults to this.
Characters are not erased for me when I hit backspace in vi. In vim, 
they are.




Anther indicator thata Garrett is right is that by doing an
	"ssh -X tao", X gives me 


X Error of failed request:  BadAccess (attempt to access private resource 
denied)
  Major opcode of failed request:  100 (X_ChangeKeyboardMapping)
  Serial number of failed request:  7
  Current serial number in output stream:  12
q3 20:06  [5032] 



If this gives annybody a clue, I'd be much obliged for some
insights.  .



Would you please try running "stty erase '^H' erase2 '^?'" in Konsole 
with default terminal settings and tell me how it behaves?


gary


		


--
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
Brian K. Reid: "In computer science, we stand on each other's feet."
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"





___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: remote [ssh] Backspace] key gives me "^?"

2007-09-15 Thread Gary Kline
On Sun, Sep 16, 2007 at 07:46:53AM +1000, Chris Keladis wrote:
> On 9/16/07, Gary Kline <[EMAIL PROTECTED]> wrote:
> 
> Hi Gary,
> 
> > On Sat, Sep 15, 2007 at 10:58:52AM -0700, Garrett Cooper wrote:
> > > Chad Perrin wrote:
> > > >On Fri, Sep 14, 2007 at 06:01:03PM -0700, Gary Kline wrote:
> > > >
> > > >>Sometimes when I ssh from a remote server and edit a file with
> > > >>vi, my [Backspace keys] are not interpretered correctly.
> > > >>Instead of erasing characters and backing up one byte and
> > > >>clearing that character my cursor moves forward.
> > > >>
> > > >>Example: typing "This" as "thos" and backspacing to the 'o'
> > > >>I'll see "thos^?^?"Can anybody 'splain what idiot thing i'm
> > > >>doing wrong and how to fix it?
> 
> When in a problematic SSH session try entering 'stty erase '


Hm.  I'm on tao2 now, ssh's into tao.  On a Konsole on tao2, 
the [backspace] key works fine--from the CL.  Your suggestion of
using the literal ^V^? makes no difference.  The only thing that
does, is selection the "freebsd console" from the  Konsole
Settings -> Keyboard drop-down, as I wrote to Chad a few minutes
ago.  So closer.  

> 
> Then hit the backspace key and see if it behaves as normal.
> 
> If that works, then you have a terminal emulation problem, and need to
> try some other terms to find one that works for your keyboard (must be
> set both client AND server-side).
> 
> If you think you really need to edit the keyboard mappings then the
> file is /etc/termcap but i strongly recommend trying a few different
> terminals (try vt100, linux, xterm, etc) before editing that file.


I'm not touching the termcap file unless it's an (abs) last
resort!
> 
> Remember, they need to be set in pairs, so change the term on both
> sides, disconnect, reconnect with the new term, and do your tests.
> 
> 

Thanks for your help, gentleen.   I'll let you know when/if I
figure this out!

gary


> 
> Hope it helps,
> 
> Chris.

-- 
  Gary Kline  [EMAIL PROTECTED]   www.thought.org  Public Service Unix
  http://jottings.thought.org   http://transfinite.thought.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: remote [ssh] Backspace] key gives me "^?"

2007-09-15 Thread Gary Kline
On Fri, Sep 14, 2007 at 07:12:04PM -0600, Chad Perrin wrote:
> On Sat, Sep 15, 2007 at 01:28:22PM -0700, Gary Kline wrote:
> > 
> > Trying to use stty failed... .
> 
> What terminal emulator are you using?  It may be that, as was the case
> with me when I was using aterm, I needed to use stty *and* needed to
> change a configuration in the aterm makefile.  It's possible that stty
> alone won't do it, but stty in combination with something else *will*.
> 

Sounds entirely rational.  Because here and with CTWM I have
simple xterms; on my "new tao" runnning Gnome as a manager, I use
Konsole.  Entrely to get the BEL in vi/nvi.  

I find that if I use Settings -> Keyboard and then select 
"FreeBSD Console", I come fairly close.  Then [Backspace] 
backs up, but the characters are not erased as I space 
backways.  UsingTerminal, it defaults to this.

Anther indicator thata Garrett is right is that by doing an
"ssh -X tao", X gives me 

X Error of failed request:  BadAccess (attempt to access private resource 
denied)
  Major opcode of failed request:  100 (X_ChangeKeyboardMapping)
  Serial number of failed request:  7
  Current serial number in output stream:  12
q3 20:06  [5032] 


If this gives annybody a clue, I'd be much obliged for some
insights.  .

gary



> -- 
> CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
> Brian K. Reid: "In computer science, we stand on each other's feet."
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"

-- 
  Gary Kline  [EMAIL PROTECTED]   www.thought.org  Public Service Unix
  http://jottings.thought.org   http://transfinite.thought.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: remote [ssh] Backspace] key gives me "^?"

2007-09-15 Thread Chad Perrin
On Sat, Sep 15, 2007 at 01:28:22PM -0700, Gary Kline wrote:
> 
>   Trying to use stty failed... .

What terminal emulator are you using?  It may be that, as was the case
with me when I was using aterm, I needed to use stty *and* needed to
change a configuration in the aterm makefile.  It's possible that stty
alone won't do it, but stty in combination with something else *will*.

-- 
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
Brian K. Reid: "In computer science, we stand on each other's feet."
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: remote [ssh] Backspace] key gives me "^?"

2007-09-15 Thread Chris Keladis
On 9/16/07, Gary Kline <[EMAIL PROTECTED]> wrote:

Hi Gary,

> On Sat, Sep 15, 2007 at 10:58:52AM -0700, Garrett Cooper wrote:
> > Chad Perrin wrote:
> > >On Fri, Sep 14, 2007 at 06:01:03PM -0700, Gary Kline wrote:
> > >
> > >>Sometimes when I ssh from a remote server and edit a file with
> > >>vi, my [Backspace keys] are not interpretered correctly.
> > >>Instead of erasing characters and backing up one byte and
> > >>clearing that character my cursor moves forward.
> > >>
> > >>Example: typing "This" as "thos" and backspacing to the 'o'
> > >>I'll see "thos^?^?"Can anybody 'splain what idiot thing i'm
> > >>doing wrong and how to fix it?

When in a problematic SSH session try entering 'stty erase '

Then hit the backspace key and see if it behaves as normal.

If that works, then you have a terminal emulation problem, and need to
try some other terms to find one that works for your keyboard (must be
set both client AND server-side).

If you think you really need to edit the keyboard mappings then the
file is /etc/termcap but i strongly recommend trying a few different
terminals (try vt100, linux, xterm, etc) before editing that file.

Remember, they need to be set in pairs, so change the term on both
sides, disconnect, reconnect with the new term, and do your tests.



Hope it helps,

Chris.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: remote [ssh] Backspace] key gives me "^?"

2007-09-15 Thread Mel
On Saturday 15 September 2007 23:24:54 Gary Kline wrote:
> On Sat, Sep 15, 2007 at 10:54:34PM +0200, Mel wrote:
> > On Saturday 15 September 2007 22:28:22 Gary Kline wrote:
> > > On Sat, Sep 15, 2007 at 10:58:52AM -0700, Garrett Cooper wrote:
> > > > Chad Perrin wrote:
> > > > >On Fri, Sep 14, 2007 at 06:01:03PM -0700, Gary Kline wrote:
> > > > >>  Sometimes when I ssh from a remote server and edit a file with
> > > > >>  vi, my [Backspace keys] are not interpretered correctly.
> > > > >>  Instead of erasing characters and backing up one byte and
> > > > >>  clearing that character my cursor moves forward.
> > > > >>
> > > > >>  Example: typing "This" as "thos" and backspacing to the 'o'
> > > > >>  I'll see "thos^?^?"Can anybody 'splain what idiot thing i'm
> > > > >>  doing wrong and how to fix it?
> > > > >>
> > > > >>  tia,
> > > > >>
> > > > >>  gary
> > > > >
> > > > >I tend to guess you're using a terminal emulator from within X when
> > > > >logging in remotely -- probably aterm or another rxvt-based terminal
> > > > >emulator.  I had similar problems.  I don't recall my exact fix, but
> > > > > it involved a two-tiered approach:
> > > > >
> > > > >  1. set a behavior using stty
> > >
> > >   Trying to use stty failed... .
> > >
> > > > >  2. change a setting in the aterm makefile before installing from
> > > > > ports
> > > > >
> > > > >My reference to the aterm makefile in part of the solution is
> > > > > because I suffered this problem when I used aterm as my terminal
> > > > > emulator of choice.  I have since then switched to rxvt-unicode
> > > > > (also known as urxvt) as my preferred terminal emulator, however,
> > > > > and no longer have this problem (as well as no longer having funny
> > > > > broken ASCII spew on my screen when reading email that contains
> > > > > unicode characters).
> > > > >
> > > > >Best o' luck.  Let us know if you think this pseudo-solution doesn't
> > > > >apply to you so we can help you brainstorm other diagnoses of your
> > > > >problem.
> > > >
> > > >It's because the TERM'inal emulation / keyboard layout's not
> > > > meshing. ^?--as I discovered after I asked the question ~8 months
> > > > ago--is a remnant DEC keyboard mapping, when if properly addressed by
> > > > setting TERM or fixing the keyboard layout to a standard ASCII
> > > > keyboard layout, the problem will go away.
> > > >
> > > > In shorter terms, if you...
> > > >1. ... switch over to TERM=xterm (assuming that the terminal prog
> > > > you're using is xterm compatible) under the settings for the app (if
> > > > they exist) ...
> > > >2. ... script in a fix so that it does this in your login shell
> > > > [you shouldn't use xterm systemwide for your TERM var, especially if
> > > > you login remotely via SSH and use CLI programs like pine (pine's
> > > > stupid and doesn't know how to emulate the xterm terminal properly
> > > > without hacking the source IIRC)] ...
> > >
> > >   Ok, I have TERM Set everywhere, plus in ~./zlogin, I have stty
> > >   set things  correctly, so it must be 3.
> > >
> > > >3. ... fix the keyboard layout ...
> > >
> > >   Problem here is HOW?  Many months ago my daughter spilled a
> > >   glass of water on my working IBM keyboard.  Surprise, the
> > >   water washed away the rinted leads... . (*mumble*) Since I
> > >   have a few others, (old, without the M$ cr*ap keys), I
> > >   chose the best, least sticky keyboard and used it.
> > >
> > >   I remapped my ~/.xmodmaprc file {{ "temporarily", ha, ha }}.
> > >   How else do I fix the layout?   IIRC, there was some place
> > >   to set the keyboard: 101, 104, 105, &c.  This old one is
> > >   probably a 101-key model.  It's a no-name deal.
> > >
> > >   Clues please?
> > >
> > >   gary
> > >
> > >
> > >   PS: {{ WARNING}}: I'Ve got a beg-athon posting upcooming
> > >
> > > > ... '^?' will be replaced with backspaces. 3. is the best solution,
> > > > but I had to do 1. before, because I didn't have root access on the
> > > > servers.
> >
> > Gosh, I had this on BSDi terminals for ages and had something in my
> > .*_profile to fix it. I think it was stty erase ^H where ^H was typed by
> > ctrl+v followed by 'H'. Should be able to execute that on terminal open
> > vim and test it.
>
>   In in ~/.zlogin (on all 5 machines) I've got
>
>   eval `tset -e^H -i^C -s -Q -m 'dialup:?xterm'`;
>
>   That  did the job until recently.   Somewhere in deep memory I
>   remember the ^V^H stuff.  Wasn't the '^' + 'H' ??

Maybe. I can't recall. Btw, you set erase to backspace there, but get a delete 
sequence, so maybe deleting -e^H on the target machine works. Then again, vim 
may be using erase2, rather then erase. Look at stty control characters 
section and fiddle around, then stick with what works. That's usually the 
best option for this non-printing character stuff :p

>   I think Garrett had the right solution, tho.

Yeah, if the terminal definition is

Re: remote [ssh] Backspace] key gives me "^?"

2007-09-15 Thread Gary Kline
On Sat, Sep 15, 2007 at 10:54:34PM +0200, Mel wrote:
> On Saturday 15 September 2007 22:28:22 Gary Kline wrote:
> > On Sat, Sep 15, 2007 at 10:58:52AM -0700, Garrett Cooper wrote:
> > > Chad Perrin wrote:
> > > >On Fri, Sep 14, 2007 at 06:01:03PM -0700, Gary Kline wrote:
> > > >>Sometimes when I ssh from a remote server and edit a file with
> > > >>vi, my [Backspace keys] are not interpretered correctly.
> > > >>Instead of erasing characters and backing up one byte and
> > > >>clearing that character my cursor moves forward.
> > > >>
> > > >>Example: typing "This" as "thos" and backspacing to the 'o'
> > > >>I'll see "thos^?^?"Can anybody 'splain what idiot thing i'm
> > > >>doing wrong and how to fix it?
> > > >>
> > > >>tia,
> > > >>
> > > >>gary
> > > >
> > > >I tend to guess you're using a terminal emulator from within X when
> > > >logging in remotely -- probably aterm or another rxvt-based terminal
> > > >emulator.  I had similar problems.  I don't recall my exact fix, but it
> > > >involved a two-tiered approach:
> > > >
> > > >  1. set a behavior using stty
> >
> > Trying to use stty failed... .
> >
> > > >  2. change a setting in the aterm makefile before installing from ports
> > > >
> > > >My reference to the aterm makefile in part of the solution is because I
> > > >suffered this problem when I used aterm as my terminal emulator of
> > > >choice.  I have since then switched to rxvt-unicode (also known as
> > > > urxvt) as my preferred terminal emulator, however, and no longer have
> > > > this problem (as well as no longer having funny broken ASCII spew on my
> > > > screen when reading email that contains unicode characters).
> > > >
> > > >Best o' luck.  Let us know if you think this pseudo-solution doesn't
> > > >apply to you so we can help you brainstorm other diagnoses of your
> > > >problem.
> > >
> > >It's because the TERM'inal emulation / keyboard layout's not
> > > meshing. ^?--as I discovered after I asked the question ~8 months
> > > ago--is a remnant DEC keyboard mapping, when if properly addressed by
> > > setting TERM or fixing the keyboard layout to a standard ASCII keyboard
> > > layout, the problem will go away.
> > >
> > > In shorter terms, if you...
> > >1. ... switch over to TERM=xterm (assuming that the terminal prog
> > > you're using is xterm compatible) under the settings for the app (if
> > > they exist) ...
> > >2. ... script in a fix so that it does this in your login shell [you
> > > shouldn't use xterm systemwide for your TERM var, especially if you
> > > login remotely via SSH and use CLI programs like pine (pine's stupid and
> > > doesn't know how to emulate the xterm terminal properly without hacking
> > > the source IIRC)] ...
> >
> > Ok, I have TERM Set everywhere, plus in ~./zlogin, I have stty
> > set things  correctly, so it must be 3.
> >
> > >3. ... fix the keyboard layout ...
> >
> > Problem here is HOW?  Many months ago my daughter spilled a
> > glass of water on my working IBM keyboard.  Surprise, the
> > water washed away the rinted leads... . (*mumble*) Since I
> > have a few others, (old, without the M$ cr*ap keys), I
> > chose the best, least sticky keyboard and used it.
> >
> > I remapped my ~/.xmodmaprc file {{ "temporarily", ha, ha }}.
> > How else do I fix the layout?   IIRC, there was some place
> > to set the keyboard: 101, 104, 105, &c.  This old one is
> > probably a 101-key model.  It's a no-name deal.
> >
> > Clues please?
> >
> > gary
> >
> >
> > PS: {{ WARNING}}: I'Ve got a beg-athon posting upcooming
> >
> > > ... '^?' will be replaced with backspaces. 3. is the best solution, but
> > > I had to do 1. before, because I didn't have root access on the servers.
> 
> Gosh, I had this on BSDi terminals for ages and had something in my 
> .*_profile 
> to fix it. I think it was stty erase ^H where ^H was typed by ctrl+v followed 
> by 'H'. Should be able to execute that on terminal open vim and test it.


In in ~/.zlogin (on all 5 machines) I've got

eval `tset -e^H -i^C -s -Q -m 'dialup:?xterm'`;

That  did the job until recently.   Somewhere in deep memory I
remember the ^V^H stuff.  Wasn't the '^' + 'H' ??

I think Garrett had the right solution, tho.

gary




> 
> 
> -- 
> Mel
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"

-- 
  Gary Kline  [EMAIL PROTECTED]   www.thought.org  Public Service Unix
  http://jottings.thought.org   http://transfinite.thought.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: remote [ssh] Backspace] key gives me "^?"

2007-09-15 Thread Mel
On Saturday 15 September 2007 22:28:22 Gary Kline wrote:
> On Sat, Sep 15, 2007 at 10:58:52AM -0700, Garrett Cooper wrote:
> > Chad Perrin wrote:
> > >On Fri, Sep 14, 2007 at 06:01:03PM -0700, Gary Kline wrote:
> > >>  Sometimes when I ssh from a remote server and edit a file with
> > >>  vi, my [Backspace keys] are not interpretered correctly.
> > >>  Instead of erasing characters and backing up one byte and
> > >>  clearing that character my cursor moves forward.
> > >>
> > >>  Example: typing "This" as "thos" and backspacing to the 'o'
> > >>  I'll see "thos^?^?"Can anybody 'splain what idiot thing i'm
> > >>  doing wrong and how to fix it?
> > >>
> > >>  tia,
> > >>
> > >>  gary
> > >
> > >I tend to guess you're using a terminal emulator from within X when
> > >logging in remotely -- probably aterm or another rxvt-based terminal
> > >emulator.  I had similar problems.  I don't recall my exact fix, but it
> > >involved a two-tiered approach:
> > >
> > >  1. set a behavior using stty
>
>   Trying to use stty failed... .
>
> > >  2. change a setting in the aterm makefile before installing from ports
> > >
> > >My reference to the aterm makefile in part of the solution is because I
> > >suffered this problem when I used aterm as my terminal emulator of
> > >choice.  I have since then switched to rxvt-unicode (also known as
> > > urxvt) as my preferred terminal emulator, however, and no longer have
> > > this problem (as well as no longer having funny broken ASCII spew on my
> > > screen when reading email that contains unicode characters).
> > >
> > >Best o' luck.  Let us know if you think this pseudo-solution doesn't
> > >apply to you so we can help you brainstorm other diagnoses of your
> > >problem.
> >
> >It's because the TERM'inal emulation / keyboard layout's not
> > meshing. ^?--as I discovered after I asked the question ~8 months
> > ago--is a remnant DEC keyboard mapping, when if properly addressed by
> > setting TERM or fixing the keyboard layout to a standard ASCII keyboard
> > layout, the problem will go away.
> >
> > In shorter terms, if you...
> >1. ... switch over to TERM=xterm (assuming that the terminal prog
> > you're using is xterm compatible) under the settings for the app (if
> > they exist) ...
> >2. ... script in a fix so that it does this in your login shell [you
> > shouldn't use xterm systemwide for your TERM var, especially if you
> > login remotely via SSH and use CLI programs like pine (pine's stupid and
> > doesn't know how to emulate the xterm terminal properly without hacking
> > the source IIRC)] ...
>
>   Ok, I have TERM Set everywhere, plus in ~./zlogin, I have stty
>   set things  correctly, so it must be 3.
>
> >3. ... fix the keyboard layout ...
>
>   Problem here is HOW?  Many months ago my daughter spilled a
>   glass of water on my working IBM keyboard.  Surprise, the
>   water washed away the rinted leads... . (*mumble*) Since I
>   have a few others, (old, without the M$ cr*ap keys), I
>   chose the best, least sticky keyboard and used it.
>
>   I remapped my ~/.xmodmaprc file {{ "temporarily", ha, ha }}.
>   How else do I fix the layout?   IIRC, there was some place
>   to set the keyboard: 101, 104, 105, &c.  This old one is
>   probably a 101-key model.  It's a no-name deal.
>
>   Clues please?
>
>   gary
>
>
>   PS: {{ WARNING}}: I'Ve got a beg-athon posting upcooming
>
> > ... '^?' will be replaced with backspaces. 3. is the best solution, but
> > I had to do 1. before, because I didn't have root access on the servers.

Gosh, I had this on BSDi terminals for ages and had something in my .*_profile 
to fix it. I think it was stty erase ^H where ^H was typed by ctrl+v followed 
by 'H'. Should be able to execute that on terminal open vim and test it.


-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: remote [ssh] Backspace] key gives me "^?"

2007-09-15 Thread Gary Kline
On Sat, Sep 15, 2007 at 10:58:52AM -0700, Garrett Cooper wrote:
> Chad Perrin wrote:
> >On Fri, Sep 14, 2007 at 06:01:03PM -0700, Gary Kline wrote:
> >  
> >>Sometimes when I ssh from a remote server and edit a file with
> >>vi, my [Backspace keys] are not interpretered correctly.  
> >>Instead of erasing characters and backing up one byte and
> >>clearing that character my cursor moves forward.
> >>
> >>Example: typing "This" as "thos" and backspacing to the 'o'
> >>I'll see "thos^?^?"Can anybody 'splain what idiot thing i'm
> >>doing wrong and how to fix it?
> >>
> >>tia,
> >>
> >>gary
> >>
> >
> >I tend to guess you're using a terminal emulator from within X when
> >logging in remotely -- probably aterm or another rxvt-based terminal
> >emulator.  I had similar problems.  I don't recall my exact fix, but it
> >involved a two-tiered approach:
> >
> >  1. set a behavior using stty


Trying to use stty failed... .

> >  2. change a setting in the aterm makefile before installing from ports
> >
> >My reference to the aterm makefile in part of the solution is because I
> >suffered this problem when I used aterm as my terminal emulator of
> >choice.  I have since then switched to rxvt-unicode (also known as urxvt)
> >as my preferred terminal emulator, however, and no longer have this
> >problem (as well as no longer having funny broken ASCII spew on my screen
> >when reading email that contains unicode characters).
> >
> >Best o' luck.  Let us know if you think this pseudo-solution doesn't
> >apply to you so we can help you brainstorm other diagnoses of your
> >problem.
> 
>It's because the TERM'inal emulation / keyboard layout's not 
> meshing. ^?--as I discovered after I asked the question ~8 months 
> ago--is a remnant DEC keyboard mapping, when if properly addressed by 
> setting TERM or fixing the keyboard layout to a standard ASCII keyboard 
> layout, the problem will go away.
> 
> In shorter terms, if you...
>1. ... switch over to TERM=xterm (assuming that the terminal prog 
> you're using is xterm compatible) under the settings for the app (if 
> they exist) ...
>2. ... script in a fix so that it does this in your login shell [you 
> shouldn't use xterm systemwide for your TERM var, especially if you 
> login remotely via SSH and use CLI programs like pine (pine's stupid and 
> doesn't know how to emulate the xterm terminal properly without hacking 
> the source IIRC)] ...


Ok, I have TERM Set everywhere, plus in ~./zlogin, I have stty
set things  correctly, so it must be 3.

>3. ... fix the keyboard layout ...


Problem here is HOW?  Many months ago my daughter spilled a 
glass of water on my working IBM keyboard.  Surprise, the
water washed away the rinted leads... . (*mumble*) Since I 
have a few others, (old, without the M$ cr*ap keys), I 
chose the best, least sticky keyboard and used it.

I remapped my ~/.xmodmaprc file {{ "temporarily", ha, ha }}.
How else do I fix the layout?   IIRC, there was some place
to set the keyboard: 101, 104, 105, &c.  This old one is 
probably a 101-key model.  It's a no-name deal.  

Clues please?

gary


PS: {{ WARNING}}: I'Ve got a beg-athon posting upcooming


> 
> ... '^?' will be replaced with backspaces. 3. is the best solution, but 
> I had to do 1. before, because I didn't have root access on the servers.
> 
> Cheers,
> -Garrett
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"

-- 
  Gary Kline  [EMAIL PROTECTED]   www.thought.org  Public Service Unix
  http://jottings.thought.org   http://transfinite.thought.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: remote [ssh] Backspace] key gives me "^?"

2007-09-15 Thread Garrett Cooper

Chad Perrin wrote:

On Fri, Sep 14, 2007 at 06:01:03PM -0700, Gary Kline wrote:
  

Sometimes when I ssh from a remote server and edit a file with
	vi, my [Backspace keys] are not interpretered correctly.  
	Instead of erasing characters and backing up one byte and

clearing that character my cursor moves forward.

Example: typing "This" as "thos" and backspacing to the 'o'
I'll see "thos^?^?"Can anybody 'splain what idiot thing i'm
doing wrong and how to fix it?

tia,

gary



I tend to guess you're using a terminal emulator from within X when
logging in remotely -- probably aterm or another rxvt-based terminal
emulator.  I had similar problems.  I don't recall my exact fix, but it
involved a two-tiered approach:

  1. set a behavior using stty
  2. change a setting in the aterm makefile before installing from ports

My reference to the aterm makefile in part of the solution is because I
suffered this problem when I used aterm as my terminal emulator of
choice.  I have since then switched to rxvt-unicode (also known as urxvt)
as my preferred terminal emulator, however, and no longer have this
problem (as well as no longer having funny broken ASCII spew on my screen
when reading email that contains unicode characters).

Best o' luck.  Let us know if you think this pseudo-solution doesn't
apply to you so we can help you brainstorm other diagnoses of your
problem.


   It's because the TERM'inal emulation / keyboard layout's not 
meshing. ^?--as I discovered after I asked the question ~8 months 
ago--is a remnant DEC keyboard mapping, when if properly addressed by 
setting TERM or fixing the keyboard layout to a standard ASCII keyboard 
layout, the problem will go away.


In shorter terms, if you...
   1. ... switch over to TERM=xterm (assuming that the terminal prog 
you're using is xterm compatible) under the settings for the app (if 
they exist) ...
   2. ... script in a fix so that it does this in your login shell [you 
shouldn't use xterm systemwide for your TERM var, especially if you 
login remotely via SSH and use CLI programs like pine (pine's stupid and 
doesn't know how to emulate the xterm terminal properly without hacking 
the source IIRC)] ...

   3. ... fix the keyboard layout ...

... '^?' will be replaced with backspaces. 3. is the best solution, but 
I had to do 1. before, because I didn't have root access on the servers.


Cheers,
-Garrett
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: remote [ssh] Backspace] key gives me "^?"

2007-09-15 Thread Chad Perrin
On Fri, Sep 14, 2007 at 06:01:03PM -0700, Gary Kline wrote:
> 
>   Sometimes when I ssh from a remote server and edit a file with
>   vi, my [Backspace keys] are not interpretered correctly.  
>   Instead of erasing characters and backing up one byte and
>   clearing that character my cursor moves forward.
> 
>   Example: typing "This" as "thos" and backspacing to the 'o'
>   I'll see "thos^?^?"Can anybody 'splain what idiot thing i'm
>   doing wrong and how to fix it?
> 
>   tia,
> 
>   gary

I tend to guess you're using a terminal emulator from within X when
logging in remotely -- probably aterm or another rxvt-based terminal
emulator.  I had similar problems.  I don't recall my exact fix, but it
involved a two-tiered approach:

  1. set a behavior using stty
  2. change a setting in the aterm makefile before installing from ports

My reference to the aterm makefile in part of the solution is because I
suffered this problem when I used aterm as my terminal emulator of
choice.  I have since then switched to rxvt-unicode (also known as urxvt)
as my preferred terminal emulator, however, and no longer have this
problem (as well as no longer having funny broken ASCII spew on my screen
when reading email that contains unicode characters).

Best o' luck.  Let us know if you think this pseudo-solution doesn't
apply to you so we can help you brainstorm other diagnoses of your
problem.

-- 
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
Thomas McCauley: "The measure of a man's real character is what he would do
if he knew he would never be found out."
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: remote [ssh] Backspace] key gives me "^?"

2007-09-15 Thread Gary Kline
On Sat, Sep 15, 2007 at 01:17:58AM +, Pollywog wrote:
> On Saturday 15 September 2007 01:01:03 Gary Kline wrote:
> > Sometimes when I ssh from a remote server and edit a file with
> > vi, my [Backspace keys] are not interpretered correctly.
> > Instead of erasing characters and backing up one byte and
> > clearing that character my cursor moves forward.
> >
> > Example: typing "This" as "thos" and backspacing to the 'o'
> > I'll see "thos^?^?"Can anybody 'splain what idiot thing i'm
> > doing wrong and how to fix it?
> >
> > tia,
> >
> > gary
> 
> Does this also happen when you use vim?
> I wonder if you are really using vi and not ee or some other editor.
> I had many problems with vi so I did 'touch .vimrc' in my home directory
> 
> cd ~
> touch .vimrc
> 
> I use vim rather than vi and if I remember correctly, when I first installed 
> FreeBSD, 'vi' was actually a symlink to 'ee'.  I might be wrong about that.
> 
> 
To you and Aryeh Friedmanboth, nope, no joy.  I was using the KDE
Konsole and finally selected the "freebsd terminal"; now the 
"<-" key works, more/less."  With Konsole I can have the BEL
('\007') sound; not with Terminal.  I am still very much in
learning mode since I recently changed from CTWM to Gnome

tx, guys,

gary




-- 
  Gary Kline  [EMAIL PROTECTED]   www.thought.org  Public Service Unix
  http://jottings.thought.org   http://transfinite.thought.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: remote [ssh] Backspace] key gives me "^?"

2007-09-14 Thread Pollywog
On Saturday 15 September 2007 01:01:03 Gary Kline wrote:
>   Sometimes when I ssh from a remote server and edit a file with
>   vi, my [Backspace keys] are not interpretered correctly.
>   Instead of erasing characters and backing up one byte and
>   clearing that character my cursor moves forward.
>
>   Example: typing "This" as "thos" and backspacing to the 'o'
>   I'll see "thos^?^?"Can anybody 'splain what idiot thing i'm
>   doing wrong and how to fix it?
>
>   tia,
>
>   gary

Does this also happen when you use vim?
I wonder if you are really using vi and not ee or some other editor.
I had many problems with vi so I did 'touch .vimrc' in my home directory

cd ~
touch .vimrc

I use vim rather than vi and if I remember correctly, when I first installed 
FreeBSD, 'vi' was actually a symlink to 'ee'.  I might be wrong about that.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


remote [ssh] Backspace] key gives me "^?"

2007-09-14 Thread Gary Kline

Sometimes when I ssh from a remote server and edit a file with
vi, my [Backspace keys] are not interpretered correctly.  
Instead of erasing characters and backing up one byte and
clearing that character my cursor moves forward.

Example: typing "This" as "thos" and backspacing to the 'o'
I'll see "thos^?^?"Can anybody 'splain what idiot thing i'm
doing wrong and how to fix it?

tia,

gary



-- 
  Gary Kline  [EMAIL PROTECTED]   www.thought.org  Public Service Unix
  http://jottings.thought.org   http://transfinite.thought.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"