Find the answer to your Linux question:
Results 1 to 3 of 3
When I run vi, vim 6.1 opens. How do I change this to vim 6.3 (which has also been installed)?...
  1. #1
    Just Joined!
    Join Date
    Dec 2008
    Posts
    16

    Change vi command to run vim 6.3

    When I run vi, vim 6.1 opens. How do I change this to vim 6.3 (which has also been installed)?

  2. #2
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,562
    Sounds like you have it installed in two different locations. Do:
    Code:
    whereis vim
    You'll likely have an exacutable in /usr/bin. If so, do:
    Code:
    ls -l /usr/bin/vi
    and see if it points to vim 6.1. If it is a symlink to 6.1, make a new symlink from /usr/bin/vi to point to the exacutable in vim 6.3.
    Linux Mint + IceWM Registered:#371367 New Members: click here

  3. #3
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    Depending on what your environment is (for instance, a shared work server), Dapper Dan's solution may not be feasible.

    Find the location of the Vim 6.3 binary. Then add the following line to your ~/.bashrc file:
    Code:
    alias vim="/path/to/vim6.3"
    Then log out and log back in.

    This defines an alias for your user, which is basically a replacement for a command. From now on, the "vim" command will redirect to the vim6.3 command, and all will be well.
    DISTRO=Arch
    Registered Linux User #388732

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...