Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
vi lovers question
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
mukwuknuk
Tux's lil' helper
Tux's lil' helper


Joined: 23 Dec 2003
Posts: 80
Location: Colorado, USA

PostPosted: Thu Jan 01, 2004 4:15 pm    Post subject: vi lovers question Reply with quote

For those of you who, as I do, like vi almost as much as an intelligent, sexy, charming person of the opposite gender, I have a question:

I always set my command prompt to behave like vi (set -o vi) but my disobedient fingers still stray to the up and down arrow keys ro recall commands, which is OK if the reacalled command needs no change, but the arrows keys ruin vi behavior if editting is needed.

Is there a way to *disable* the up and down arrow keys from recalling commands? Thanks!
_________________
"If there are back-slashes in your path, you're heading down the wrong path ... backwards."
Back to top
View user's profile Send private message
Oatmeal
n00b
n00b


Joined: 17 Dec 2003
Posts: 46

PostPosted: Thu Jan 01, 2004 11:19 pm    Post subject: Reply with quote

Just press the escape key after you press the arrow key to switch your shell from insert mode to command mode.
Back to top
View user's profile Send private message
mukwuknuk
Tux's lil' helper
Tux's lil' helper


Joined: 23 Dec 2003
Posts: 80
Location: Colorado, USA

PostPosted: Fri Jan 02, 2004 2:53 am    Post subject: Reply with quote

Thanks for the suggestion, but I'm not asking about switching from one mode to another in vi.

This is a command-line question only and isn't really about using vi as an editor.

I'm wondering if I can effectively and permanently disable the retrieval of past commands via the up and down arrows. While such a techique is admittedly characteristic of BASH, it's a decidedly "non-vi" way of getting commands recalled and accidental use of the arrows seriously goofs up vi-like-behaviour at the command prompt.

But I do appreciate the help.
_________________
"If there are back-slashes in your path, you're heading down the wrong path ... backwards."
Back to top
View user's profile Send private message
Bonkie
Guru
Guru


Joined: 28 Oct 2002
Posts: 501
Location: Antwerpen, Belgium

PostPosted: Fri Jan 02, 2004 1:17 pm    Post subject: Reply with quote

Very interesting actually.

man bash doesn't show any option to alter or disable that behaviour. You can however turn off the interactive shell but that doesn't help you ...
_________________
"I would say we have a 50% chance of survival, but I consider myself an optimist so I'll give us 50,5% ..."
~ Arthur C. Clarke [Physics PHD,SF Writer], when asked about the chances of the human race's survival
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum