I installed about 3 packages of Vim in cygwin, but when I type vi, vim, there is no error, but nothing is printed.
.bash_profile
describes export PATH=$PATH:/usr/bin/vi
and echo$PATH
finally printed /usr/bin/vi
, so I think you can pass through the path.
Can someone tell me how to solve it?
Also, when I fiddled with .bashrc
and .bash_profile
to set environment variables, aliases were available until now, but they were no longer available.What is the cause?
.bashrc
alias c='cygstart'
aliasls='ls-fg --color=auto --show-control-chars'
alias df = 'df-h'
alias x = 'exit'
alias vi = '/usr/bin/vi'
.bash_profile
.$HOME/.bashrc
export PATH=$PATH:/usr/bin/vi
The first misunderstanding is that setting the environment variable PATH
is the directory name (where the executable = command is stored).If vi
is present in /usr/bin/vi
,
when set to PATH
export PATH="$PATH:/usr/bin"
.
However, /usr/bin
should be configured as a standard path, so installing Vim does not require the user to add the configuration again.Delete the export PATH...
mentioned this time and verify that the command specified in the which
command has passed.
$which vim
/usr/bin/vim
Note:
which command - Display the full path of the execution command: Linux basic command Tips
Also, if it is an alias to vim
, it is common to configure the following settings:
alias vi = 'vim'
© 2024 OneMinuteCode. All rights reserved.