zsh: command not found: mvim - vim

Recently I've installed MacVim and I'm having an issue with run it using iTerm. When I try to run it using the mvim from the iTerm it appeared command not found: mvim. I've tried the solution that provided on this thread but it didn't help. Can anyone please help about this?

Echo the value of your $PATH variable while at your prompt; the mvim file has to be in one of the directories listed there in order to be found when you try to run it.
Either move the mvim script there, or add the directory it is currently located in to your PATH via your .zshrc.

I've got this way:
brew install macvim --override-system-vim --custom-icons --with-cscope --with-lua --enable-pythoninterp --enable-python3interp --ovrride-system-vi --with-python --with-python3

I solved it by this, you may try it:
brew unlink vim
brew link macvim

Related

YouCompleteMe unavailable: module 'collections' has no attribute 'Mapping'

Hi I have been trying to setup YouCompleteMe in vim but it don't work. I am using vim-plug. I tried around 3 different YouCompleteMe repositories but i always got the same error. I am using a Mac os and everything about vim is up to date. I tried adding scripts in .vimrc, running install.py but non of em worked. I really need Help. Here is my .vimrc script and the error
The easiest way to fix the problem is to install youcompleteme in the following way.
In a Terminal, run the command:
$ sudo apt install vim-youcompleteme
Next, run the command:
$ vim-addon-manager install youcompleteme
I got my exactly the same problem fixed a minute ago by running the above two commands, thanks to dominoc925's youcompleteme installation instructions.

Installing Vim with Python3 support?

I installed Vim on my MacBook today (using brew install vim), but I am having a problem: vim --version tells me that there is no Python 3, which I need. I already reinstalled the newest version of Python from their website, then did brew delete vim and brew cleanup and reinstalled Vim, but I'm still having the same problem. Online, I saw the option to use the flag --with-python3 when installing, but when I try that, I get told that this flag doesn't exist. Now I don't know what to do. Do I need to install Python via Homebrew? I also found some people online saying that there are versions of Vim compiled without Python, and that you can compile Vim yourself. Do I need to do that? How?
I should add: I'm very new to this, so if you post your answers or maybe need some more information from me, please explain in detail so I can understand.
I'm a new too.
First, use brew to remove vim you should input brew uninstall vim.Then try to reinstall vim.
For instance, if you wanted to recompile Vim 8 with Python 3 support on Linux, you can try do the following:
$ git clone https://github.com/vim/vim.git
$ cd vim/src
$ ./configure --with-features=huge --enable-python3interp
$ make
$ sudo make install
So,
I include this answer to "Way 0" and "Way 1".
_______________________________________________________________---Way 0 Begin---(:
Way 0:
we should reinstall python3 and VIM,
1.run the below on terminal
brew reinstall python3
the upstairs shows that we reinstall python3 to make sure that needed by VIM.
2.continue run on terminal
brew uninstall vim
the upstairs shows that uninstall vim only if you previously installed it
3.run on terminal
brew install vim
the upstairs shows that reinstall vim via Homebrew
4.run on terminal
4.1 directly use $SHELL command
alias vim=/usr/local/bin/vim
4.2 or bash 's profile(if you use bash as SHELL)
echo 'export PATH="/usr/local/opt/vim/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
4.3 OR zsh configuration file(if you use zsh as SHELL)
edit your zsh configuration file ~/.zshrc via
vim ~/.zshrc
and add the below to TOP line(just use i to enter editing status,
then use ":wq" to quit editing status and save file):
export VIM_HOME=/usr/local/Cellar/vim/8.2.2100/
export PATH=$PATH:$VIM_HOME/bin
and active that config
source ~/.zshrc
(Both 4.1 or 4.2 or 4.3 are the same function.)
the upstairs 4.1/4.2/4.3 shows that we let shell command vim using HomebrewVIM not the defaultVIM.
We know the default VIM functional file is located at /usr/bin/vim,
while homebrew VIM functional file is located at /usr/local/bin/vim;
And default VIM support Python2 with not supporting Python3,
but homebrew VIM support Python3(That's also we needed!).
Let's look at Homebrew VIM:
Homebrew will install VIM vim at /usr/local/Cellar/vim,
create soft link vim under /usr/local/opt,
and Homebrew VIM 's functional file vim is located at /usr/local/bin/vim, also linked to /usr/local/Cellar/vim.
5.exit terminal and restart terminal or even restart mac, input
the below on terminal
vim --version | grep "python3"
checkout whether the symbol bdfore "python3" is + or Not?
"+" means VIM support python3, but "-" Not.
____________________________________________________________---Way 0 END---:)
____________________________________________________---Way 1 Start---(::
Way 1:
First, you need to use this to checkout whether VIM support Python3 or not?
vim --version | grep python
you may see the terminal output liking:
+conceal +linebreak -python3 +visual
as the upstairs shows: that Mac default installed VIM DO NOT SUPPORT Python3.
And that default installed VIM of Mac is not been installed via "brew".
Now, we could not use liking "brew remove" to delate that default installed VIM of Mac,
and it's also why your action
"brew delete vim and brew cleanup and reinstalled Vim"
DO NOT FUNCTION!
Second,
we need to know where that fu-king default installed VIM with not supporting python3,
which vim
output:
/usr/bin/vim
mostly shows like the upstairs(depends default macOS).
Even we use "--with-python3 " to install VIM with supporting
Python3at a long time, but Now Homebrew ONLY recognize "python -V"'s version.
SO we NEED to manually let default python to be python3.
Open your terminal and input:
alias python="python3"
then checkout python that that version whether is python3 or not:
python -V
then, we found that "python -V" shows "Python 3.9.12".
Third,
That's time to use Homebrew to install VIM.
brew install vim
After installing HomebrewVIM, we need to make sure where is HomebrewVIM,
differ from that default installed VIM of Mac:
which vim
output:
/usr/local/bin/vim
Please restart Your Mac, restart Your Terminal and reenter your terminal!!!
Please restart Your Mac, restart Your Terminal and reenter your terminal!!!
Please restart Your Mac, restart Your Terminal and reenter your terminal!!!
then, we need to checkout whether that HomebrewVIM supports Python3 or Not:
vim --version | grep python
output:
+conceal +linebreak +python3 +visual
Successful!
__________________________________________________---Way 1 Terminal---::)
END!

Upgrade to Vim 7.4 in OS X El Capitan

I am new to Vim but am determined to learn it. I am on OS X El Capitan and have tried upgrading Vim 7.3 to 7.4 using several options but with no success.
I have used brew install with --with-system-override-vim option but although I can see that vim 7.4 is installed when I start my Vim editor it again reverts back to 7.3 version only.
Can anyone please guide me through the process of making sure that the system version is upgraded to 7.4.
Pretty sure homebrew installs vim under /usr/local/bin/
You really shouldn't overwrite the system vim, you should an alias to your .bash_profile file,
alias vim='/usr/local/bin/vim'
The other option would be to "hide" the current vim
mv /usr/bin/vim /usr/bin/vim73
And then when you run the vim command it won't find it under /usr/bin/ and will look in /usr/local/bin/
#dursk answer is correct, but I didn't have "/usr/local/bin/vim". My solution was to upgrade to latest version of MacVim it's 8.0 now ( http://macvim-dev.github.io/macvim/) install MacVim via .dmg file
after adding line below to .bash_profile file in user root folder
alias vim="/Applications/MacVim.app/Contents/MacOS/Vim"
After should run command source ~/.bash_profile to update bash_profile settings
Don't replace the system vi/vim in /usr/bin. Instead, use homebrew to install a newer version of vim:
brew update
brew install vim
That will install a newer vim to /usr/local/bin/vim. Make sure that your $PATH has /usr/local/bin before /usr/bin. You would probably also want to add a symlink for vi in /usr/local/bin as well:
ln -s /usr/local/bin/vim /usr/local/bin/vi
which vim # verify that it is /usr/local/bin/vim
which vi # verify that it is /usr/local/bin/vi

How to setup virtualenvwrapper in zsh under linux mint?

I use virtualenvwrapper from apt.
It's working OK with bash but I recently switched to zsh.
Now when I try workon in zsh I get zsh: command not found: workon
Because I'm using oh-my-zsh script/plugins I thought it will be sufficient to add virtualenv and virtualenvwrapper plugins to my .zshrc plugins=.
But it did not help. What else I need to configure to make it work under zsh?
PS to be clear - I still can use bash for this - nothing broken here...
I just test it on ubuntu 14.04 and i had the same problem.
To fix it add this to your .zshrc
source /usr/share/virtualenvwrapper/virtualenvwrapper.sh
or run this in terminal
echo source /usr/share/virtualenvwrapper/virtualenvwrapper.sh >> ~/.zshrc

Uninstalling MacVim

I've removed MacVim from my /Applications/ directory but in terminal when I type vim an error is displayed: no such file or directory: /Applications/MacVim.app/Contents/MacOS/Vim
How do I go back to using the pre installed copy of vim?
Try brew uninstall macvim.
It will help if MacVim was installed with brew.
In the terminal type: which vim
That'll tell you what it's running when you type vim.
And if it's not /usr/bin/vim you're probably safe to delete it so it can find the pre installed version again.

Resources