Making Vi the default editor on Linpus Linux Terminal

Discussion in 'Linux' started by ed_o_brain, Jan 1, 2009.

  1. ed_o_brain

    ed_o_brain

    Joined:
    Dec 31, 2008
    Messages:
    5
    Likes Received:
    0
    Hi,

    Firstly thanks for a great forum. I've had my Aspire one for a couple of days, and already his has proved to be a great resource.

    I've used Unix extensively (ksh) and I'm just getting to grips with Linpus Linux. I've found the terminal, uninstalled some of the packages I don't want e.g. games and non-English language support in order to save space on my basic 110aw.

    I'm struggling to change the default command line editor for the terminal from what presumably is emacs to vi(m). Using 'set -o vi' works for the current session, but is there not a config file I can change somewhere to save me from doing this each time I open a terminal session?

    I have tried editing the .bash_profile under /home/user but to no avail. I added the line 'set -o vi' to the end of it.

    Please could you suggest where I might be going wrong?

    Thanks
    Ed
     
    ed_o_brain, Jan 1, 2009
    #1
  2. ed_o_brain

    daldred

    Joined:
    Aug 25, 2008
    Messages:
    887
    Likes Received:
    0
    You need to set the bash environment variable $EDITOR. In your .bashrc file, add this line:

    Code:
    export EDITOR="vi"
     
    daldred, Jan 1, 2009
    #2
  3. ed_o_brain

    ed_o_brain

    Joined:
    Dec 31, 2008
    Messages:
    5
    Likes Received:
    0
    Thank you!

    Actually, adding that line made vi the default editor but not the command line editor.
    In order to do this, I added 'set -o vi' to the .bashrc file.

    So it was just simply a case of editing the wrong file to begin with!

    In any case, help much appreciated. Apologies for being a n00b!
     
    ed_o_brain, Jan 1, 2009
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.