LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Possible problem with VISUAL=vi (vim & bash) (https://www.linuxquestions.org/questions/linux-newbie-8/possible-problem-with-visual%3Dvi-vim-and-bash-316850/)

redthor 04-25-2005 12:00 AM

Possible problem with VISUAL=vi (vim & bash)
 
dist: Core Linux
shell: bash
uname: Linux 2.6.11.7 SMP i686
editor: vi symbollically linked to vim

Hi There,
I'm trying to make it that my shell command line editing uses vi mode. I've used Solaris and AIX but I am new to Linux.

From editing .profile and adding:
export VISUAL=vi
i expected that at my command prompt:
$
I would be able to press [ESC] and then scroll through the history with j,k and edit the lines with vi commands like dw and, more importantly, search for a shell command in the history with /.

I've made the modification above but it doesn't work. I think that I'm either doing it incorrectly (perhaps I have to use ksh?) or I need to reset my expectations!

Thanks muchly for any advice.

jschiwal 04-25-2005 03:16 AM

I think that you want to use the 'set -o vi' builtin command in your .bash_profile or .bashrc or .profile or .bash_login.

Refer to the bash info pages for details on which setup file to use.

hint: enter "info:bash" in the konqueror web browsers address bar to display a webalized version of the bash manual. It is much easier to read.

redthor 04-26-2005 06:19 AM

That's exaclty what I needed. Thanks.


All times are GMT -5. The time now is 05:58 PM.