LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-25-2005, 12:00 AM   #1
redthor
LQ Newbie
 
Registered: Apr 2005
Location: Melbourne, Australia
Distribution: Core
Posts: 6

Rep: Reputation: 0
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.
 
Old 04-25-2005, 03:16 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
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.

Last edited by jschiwal; 04-25-2005 at 03:19 AM.
 
Old 04-26-2005, 06:19 AM   #3
redthor
LQ Newbie
 
Registered: Apr 2005
Location: Melbourne, Australia
Distribution: Core
Posts: 6

Original Poster
Rep: Reputation: 0
That's exaclty what I needed. Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Stupid Question: Microsoft Visual Studio 6.0 (A.K.A. Visual Basic 6) Will it run? S0RD3N Linux - Software 8 05-07-2008 08:42 PM
VIM insert before a visual block... pld Linux - Software 0 06-22-2005 11:36 AM
Using Visual in VIM editor manikantha Linux - General 4 06-10-2005 08:55 AM
VI & VIM are borked! d33pdream Linux - Software 4 11-15-2004 02:57 AM
XFCE 4.0.1 & vim fr0zen Linux - Software 2 12-11-2003 02:23 PM


All times are GMT -5. The time now is 04:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration