I have made a softlink inside /bin/ that points from gvim to v, so I can just type v in console it would open up gvim.

But instead it opens the regular console version. How can I make it open gvim instead?

  • What wrong with using an alias instead of a softlink?
    – DavidPostill
    Dec 2 '18 at 11:46
  • doesn't work on superuser Dec 2 '18 at 13:52

I tried replicating your problem, without success, using the following command:

sudo ln -s /usr/bin/gvim /bin/v

You could preferably also use an alias, by adding the following to ~/.bashrc:

alias v="/usr/bin/gvim"

To apply this change, run:

source ~/.bashrc

  • doesn't work with super or other users Dec 2 '18 at 13:52
  • I tried the same command but it still opens in terminal, do you get the window with the command bar or a terminal window with vim running inside it Dec 2 '18 at 13:53
  • If you are using a Debian based distro such as Ubuntu, you should try adding the alias to /etc/bash.bashrc which works system-wide. Let me know if that works.
    – Eloy
    Dec 2 '18 at 17:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.