'Shortcut' for running vim63
In Windows you can enter in the Run dialog box or in Command prompt stuff like notepad and explorer because they're in system32; how do I add the bin directory of vim63 to some sort of script file so that I can run 'vim' quickly?
|
Hi xtheunknown0,
You just need to add the directory to your PATH variable, eg. if you use bash, edit ~/.bash_profile Change this: PATH=$PATH:$HOME/bin to: PATH=$PATH:$HOME/bin:/path/to/vim63/bin cheers, kbp |
Quote:
./vim while inside the bin directory. Doesn't this mean that 'vim' is not 'registered' as a command? How do I make vim a command? |
Did you modify your path as I suggested ? .. once you have, you will be able to run vim from anywhere. BTW.. are you running Linux or Windows ?
|
Quote:
Quote:
|
Please, post the output from each of the following commands, so we can see where the problem is:
Code:
echo $PATH |
[QUOTE=colucix;3662681]Please, post the output from each of the following commands, so we can see where the problem is:
Code:
# echo $PATH Code:
# which vim Code:
# ls -F /opt/vim63/bin |
As you can see the directory /opt/vim63/bin is not in your PATH environment variable. Just do
Code:
export PATH=/opt/vim63/bin:$PATH Another aside note: in your PATH appear . (dot) that is the current working directory, whatever it be. This is not a good thing, due to security reasons. I would advice to remove it from your PATH. |
Quote:
#!/bin/bash export IRCNICK=DSL SSH=`env | grep SSH_CONNECTION` RUNLEVEL=`runlevel|cut -f2 -d' '` if [ -z "$SSH" ]; then if [ $RUNLEVEL -eq 5 ]; then startx fi fi Quote:
Code:
export PATH=/opt/vim63/bin:$PATH Quote:
|
Quote:
If you want to apply the change for all users, one of my preferred methods is to add an entry in the /etc/profile.d directory (if your OS supports it). Create a file called /etc/profile.d/vim63.sh containing the statement above: Code:
export PATH=/opt/vim63/bin:$PATH A more simple way is to create a soft link in /usr/local/bin, since this location is usually in the default PATH for both users and root: Code:
ln -s /opt/vim63/bin/vim /usr/local/bin/vim Quote:
|
Problem solved
[quote=colucix;3663213]A more simple way is to create a soft link in /usr/local/bin, since this location is usually in the default PATH for both users and root:
Code:
ln -s /opt/vim63/bin/vim /usr/local/bin/vim |
All times are GMT -5. The time now is 10:36 PM. |