Find the answer to your Linux question:
Results 1 to 7 of 7
Usually, whenever I type vi into the command prompt on most of the linux systems ive used, it will bring up vim instead of the old vi. For some reason, ...
  1. #1
    Just Joined!
    Join Date
    Aug 2006
    Posts
    49

    Using vi instead of vim

    Usually, whenever I type vi into the command prompt on most of the linux systems ive used, it will bring up vim instead of the old vi.

    For some reason, on one of my debian systems, I have to type vim to bring up vim, instead of vi. I tried changing the symbolic link in the usr/bin with ln -s vi vim but that doesnt seem to work.

    Also, color shows up when Im using the old vi, like coloring for key words in C and Python, but their is no coloring present for vim.

    So my question is, how can I get "vi" to open up "vim" and how can I get the coloring working in vim?

    thanks,
    Zack

  2. #2
    Linux Engineer
    Join Date
    Oct 2004
    Location
    Vancouver
    Posts
    1,366
    not sure why linking /usr/bin/vi to /usr/bin/vim isn't working, are you sure the link is actually changing, do you have permissions to update this?

    Also, coloring is generally set in your vimrc., for example mine contains:

    highligh NORMAL cterm=Green ctermbg=Black
    Operating System: GNU Emacs

  3. #3
    tpl
    tpl is offline
    Linux User
    Join Date
    Jan 2007
    Location
    cleveland
    Posts
    452
    if you want to link the name 'vi' to the program vim,

    ln -s vim vi

    you've got the order backwards. Can't say about coloring--
    I use ed

  4. #4
    Just Joined!
    Join Date
    Jul 2004
    Location
    Panama
    Posts
    20
    Quote Originally Posted by zackboll
    Usually, whenever I type vi into the command prompt on most of the linux systems ive used, it will bring up vim instead of the old vi.

    For some reason, on one of my debian systems, I have to type vim to bring up vim, instead of vi.
    thanks,
    Zack
    Debian comes with nvi, nano, ed, by default. So if you ask for vi, you get nvi, as for vim you have to install it, and ask for it.

    Maybe i don't understand your question

  5. #5
    Just Joined!
    Join Date
    Aug 2006
    Posts
    49
    Quote Originally Posted by genesus
    not sure why linking /usr/bin/vi to /usr/bin/vim isn't working, are you sure the link is actually changing, do you have permissions to update this?

    Also, coloring is generally set in your vimrc., for example mine contains:

    highligh NORMAL cterm=Green ctermbg=Black

    Where is the vimrc file?

  6. #6
    Just Joined!
    Join Date
    Aug 2006
    Posts
    49
    sorry to bring up an old thread.

    I got the symbolic link thing working, I was confused because ubuntu brought up vim when I typed vi and I think debian used to do the same thing until it started bringing up actual vi instead of vim when I typed vi.


    I still haven't figured out how to set the color options in vim. I looked in the /etc/vim directory at the config files and did not see an obvious color setting.

    Does anyone know how to do this?

    thanks,
    Zack

  7. #7
    Just Joined!
    Join Date
    Sep 2007
    Posts
    1
    This annoyed me for hours when I switched from Gentoo to Debian.

    Debian supplies vim-tiny with the base installation.
    How it acts depends on how you run it..

    vi = vi compatibility mode (gets config from /etc/vim/vimrc.tiny)
    vim = 'fancy' vim mode with extensions (gets config from/etc/vim/vimrc)

    If, like me, you want both 'vi' and 'vim' to run the 'fancy' mode..
    Code:
    alias vi=vim
    In your bash shell or in ~/.bashrc (per user) or /etc/bash.bashrc (system-wide) shell config files.

    This is easily reversed and can be set on a per-session, per-user or system-wide basis (assuming your users all use bash).
    Messing with symlinks as suggested above is a system-wide change.

    If you replace vim-tiny with another version of vim you can, of course, configure it however you like.

    All is explained in /usr/share/doc/vim-common/NEWS.Debian.gz ..
    Code:
    cat /usr/share/doc/vim-common/NEWS.Debian.gz | gunzip | more

Posting Permissions

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