Re: Backspace problems

2007-06-12 Thread Jerry McAllister

 
 Scott Mayo wrote:
 
 If I hit backspace it just backs up on the line until
 were input-mode 
 was started during this input-mode session.  If I hit
 delete then it 
 capitalizes the charcter behind the cursor and throws
 me into 
 command-mode.

You just need to get it configured right.  For some things
I need to do something like CTRL-BACKSPACE instead of regular
BACKSPACE or other variations in certain circumstances.  But,
I get what I need with the defaults (nothing special), so I
haven't bothered to learn the keyboard config and vi config, etc
stuff, but it is there and people make them do whatever they 
want.If you really want, you can make it remap however
you want.   But, you will probably have to do some research
on keyboard remapping and vi, and command line config, etc.

jerry

 
 
 ===
 This way to get things to delete in vi seems odd to
 me.
 I have always used 'x' to delete from the right, and
 X to delete from the left. Maybe some hacks of vi
 include alternative methods to navigate. The problem
 with learning a method using shortcuts is that the
 pure method becomes unnatural and difficult. vi
 becomes real useful once you start doing things in it
 by reflex. If your reflexes are of the pure method
 then you should be good from one vi to the next. Even
 in my case, using the arrow keys seems more natural
 for jumping around (than using the jkl and ; keys).
 This is even more true for me since I use the Dvorak
 keyboard layoun and j, k, l and ; are not close
 together (well, j and k are -- and l and ; are too;
 but still not quick or easy to use for navigation.)
 
 Maybe the vim port in the ports collection will bring
 you completeness in your OS experience.
 
 ==
 Because sentence against an evil deed is not executed speedily, the human 
 heart is fully set to do evil.
 Ecclesiastes 8:11
 
 

 
 Be a better Globetrotter. Get better travel answers from someone who knows. 
 Yahoo! Answers - Check it out.
 http://answers.yahoo.com/dir/?link=listsid=396545469
 ___
 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: Backspace problems

2007-06-12 Thread Scott Mayo

doug wrote:

On Mon, 11 Jun 2007, Scott Mayo wrote:

I am not on any VI list, but thought I would post this here to see if 
anyone had any ideas.


This is my first FreeBSD server, so I am still learning.

I got my backspace and delete working the shell after a few 
adjustments, but they still act odd in VI.  I have checked setting 
with my linux boxes (the backspace and delete work fine there) and 
everything looks the same.  I did an stty -a | grep erase and it tells 
me that erase is Contral-? and erase2 is control-H.  I have changed 
both around to make them either Ctrl-? or Ctrl-H, but that has not 
helped.


If I hit backspace it just backs up on the line until were input-mode 
was started during this input-mode session.  If I hit delete then it 
capitalizes the charcter behind the cursor and throws me into 
command-mode.


I am not sure if there are anymore settings to change in FreeBSD or if 
it is a setting in VI.


Any help would greatly be appreciated.


Scott, my stty -a:

cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = undef;
eol2 = undef; erase = ^H; erase2 = ^@; intr = ^C; kill = ^U;
lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q;
status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;

IMO redefining keys is not a good thing if you are learning UNIX and vi. 
In the default setup (I use tcsh for an interactive shell) ctrl-h is a 
backspace and functions on the command line like the backspace key, 
i.e., deletes the char to the left of the cursor. In vi the delete-key 
== x in command mode (by default). The [del] key does not work on the 
command line.


I would advise getting comfortable with the default settings before 
branching out. Key bindings and /etc/termcap changes have lots of 
ramifications. vi is as it is because it was written when systems were 
line oriented. The 'hjkl' are where your fingers sit if you are a touch 
typist, and hence were chosen for that purpose. As late as 1995 vi on 
BSDI (where I start on the BSD trail) did not support the cursor keys 
very well.


I have attached a vi cheat sheet that I found years ago. This is a 
pretty good starter set of commands for vi.


vi is not even as bad as it gets. vi is in /usr/bin so if your system is 
really broken and you must edit something ed is the tool available in 
FreeBSD.





Thanks for the info Doug.  A friend of mine set me on the right path.  I 
have been using vi in linux, except it was not vi.  Vi was aliased to 
vim.  I had installed vim on my FreeBSD server the other day, but that 
did not fix it.  I found out that it has to be run with 'set nocp' so 
that it does not run in vi compatibility mode.


I did this and now my backspace and delete work like I want them to. :)

I appreciate the replies.

--
Scott Mayo
System Administrator
Bloomfield Schools
PH: 573-568-5669
FA: 573-568-4565
Pager: 800-264-2535 X2549

Duct tape is like the force, it has a light side and a dark side and it
holds the universe together.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backspace problems

2007-06-12 Thread Lars Kristiansen
Thanks for the info Doug.  A friend of mine set me on the right path.  I 
have been using vi in linux, except it was not vi.  Vi was aliased to 
vim.  I had installed vim on my FreeBSD server the other day, but that 
did not fix it.  I found out that it has to be run with 'set nocp' so 
that it does not run in vi compatibility mode.


I did this and now my backspace and delete work like I want them to. :)

I appreciate the replies.


For vim, my favorite is this:
cp /usr/local/share/vim/vim70/vimrc_example.vim ~/.vimrc


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


RE: Backspace problems

2007-06-11 Thread Neil Short

Scott Mayo wrote:

If I hit backspace it just backs up on the line until
were input-mode 
was started during this input-mode session.  If I hit
delete then it 
capitalizes the charcter behind the cursor and throws
me into 
command-mode.


===
This way to get things to delete in vi seems odd to
me.
I have always used 'x' to delete from the right, and
X to delete from the left. Maybe some hacks of vi
include alternative methods to navigate. The problem
with learning a method using shortcuts is that the
pure method becomes unnatural and difficult. vi
becomes real useful once you start doing things in it
by reflex. If your reflexes are of the pure method
then you should be good from one vi to the next. Even
in my case, using the arrow keys seems more natural
for jumping around (than using the jkl and ; keys).
This is even more true for me since I use the Dvorak
keyboard layoun and j, k, l and ; are not close
together (well, j and k are -- and l and ; are too;
but still not quick or easy to use for navigation.)

Maybe the vim port in the ports collection will bring
you completeness in your OS experience.

==
Because sentence against an evil deed is not executed speedily, the human heart 
is fully set to do evil.
Ecclesiastes 8:11


   

Be a better Globetrotter. Get better travel answers from someone who knows. 
Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=listsid=396545469
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]