GVim does not launch after installing plugins (Windows) - vim

I installed Vim 7.4 in a Windows 8 machine and it was working fine. After installing all plugins in my .vimrc, GVIM crashed and it wouldn't open again. I could manage to use VIM from cmd but not without some errors. My first try was to reeinstall GVIM completely. After reinstalling, it worked fine but if I also reinstall my plugins it would crash and not open again. What should I do?

I removed all plugins and installed one by one until I got the error, which was with the Ultisnips plugin. I happen to know that this plugin requires VIM with Python support, which my VIM probably wouldn't have. To test this, run vim --version and look for a +python (or run echo has("python") from inside GVIM and look for a output of 1). In my case, it was -python, which was confusing, since I have Python installed. According to this answer, you need to install Python after installing VIM, so I did it and it worked.

Related

Vim plugin youcompleteme: cannot start Ycm Server / YcmToggleLogs shows nothin

I am quite new to Vim on Mac OSX 10.13. I installed a few plugins, especially for use with Python.
Thus I installed YouCompleteMe & compiled it. Originally I got an error because a trial of Kite shut the server down. But this I deactivated and now I restart and restart the server just to get it shutdown.
And the YcmToggleLogs does not show anything :-(
I followed all of the advice given here: YCM error. The ycmd server SHUT DOWN (restart wit...the instructions in the documentation
But still it doesn't work.
And of course I followed along with the official install manual:
Install YCM plugin via Vundle
Install cmake, macvim and python
Note that the system vim is not supported.
brew install cmake macvim python
.
Install mono, go, node and npm
brew install mono go nodejs
Compile YCM
cd ~/.vim/bundle/YouCompleteMe python3 install.py --all
Btw, when compiling everything I get several warning along these lines:
ld: warning: text-based stub file /*****/CoreFoundation.tbd and library file
/****//CoreFoundation.framework/CoreFoundation are out of sync.
Falling back to library file for linking.
Any ideas what I can do to get it off the ground?
Thanks.
On Linux, with VIM >8.1
To solve the issue, run the installer from the plugin.
Go to vim folder
cd ~/.vim/plugged/YouCompleteMe
and run the installer.sh
./installer.sh
hope this solution solves your as well.

vim freezes when changing colorscheme

I start vim without custom config
vim -u NONE
Then, I call the colorscheme command to change the colorscheme, and vim simply freezes.
:colorscheme desert
It does not matter what colorscheme I specify, vim always freezes.
This happens on Mac OS only. I upgraded my macvim from 8.1 to 8.2, and I still see the freeze.
I don't think anything is wrong with my vim config since I am launching vim without custom config.
Any suggestions on how to either fix or debug the hang?
The issue is with Mac Terminal Itself. It used to freeze for me too but now I've switched from bash to zsh and everything works fine even for my Macbook Air 2017(8 GB) and on top of that I am using over 20 plugins which include a lot of linters and fixers.
Difference from bash to zsh is the reason that I am back to Vim again.
Also, if you have Catalina on your system, zsh is in there ,you'll just have to set it as default

How to add python support for vim without destroying up all the plugins?

I started using vim earlier this summer and have recently started to add plugins. Todays challenge is to install YouCompleteMe.
Problem: During the installation process I noticed that my vim version (7.4) doesn't have support for python/python3.
Question: How can I fix this without messing up all my plugins/.vimrc file?
Will a clean install even affect my plugins/.vimrc?
I read some where that I should install 'vim-nox'.. Should I?
My setup: Ubuntu 16.04. Vim 7.4. Plugins are installed via Pathogen.
Thanks in advance for your replies!
Kind regards, Edvin
As long as your plugins are installed in $HOME/.vim (or MsWindows equivalent), and not into /etc/vim or /usr/share/vim, there should be no problem: you can upgrade your vim version without impacting what you have already installed.
See :h 'rtp' and :h startup.
Plugins and vimrc are just files. They can't be executed stand alone. Further, they come into power, only when vim is running.
So, your uninstallation/installation of vim doesn't change/affect plugins or vimrc. However, if the plugin or vimrc has code related to specific environment (like OS, terminal, etc,.) or needs specific features of vim and if your new version doesnt support them, you may have problems. Plugins in default folder(where vim is installed) will get deleted when you uninstall. The plugins in HOME directory aren't affected anyway.

Using the correct version of vim

I installed vim with:
brew install vim --override-system-vi
I also installed macvim using:
brew install macvim
However, terminal vim uses 7.4.52 and macvim uses 7.4.22. Any way around this?
I've uninstalled and reinstalled many times, but I must be doing it wrong...
which vim returns /usr/local/bin/vim
which mvim returns /usr/local/bin/mvim
Any help would be greatly appreciated.
Thnx!
You only need to install macvim: it runs both as a GUI and in the terminal.
I don't know where the confusion comes from but neither gvim nor macvim are frontends for a separate vim. They are vim.
you can rename your system vim, then vim will be the mac vim
You've installed two different pieces of software..but you only want to use one? If so, then just alias your macvim in your shell; for example:
alias vim="/Applications/MacVim.app/Contents/MacOS/Vim"

brew installed Vim in Terminal with RVM (Ruby 1.9.3), MacVim and Command-T

I'm using RVM (1.17.7) and Ruby 1.9.3p362. In the long run I want to move over to Vim in the Terminal with Tmux. I'm trying to learn how to install and run with my choices for plugins instead of defaulting to Janus, just trying to learn it all and not be a cargo cult programmer.
I did a brew install of Vim git clone of Command-T (I'm using Pathogen) while the Ruby was set to 1.9.3... and everything is good in Terminal using Vim and Command-T. When I run :ruby puts RUBY_VERSION in Terminal Vim, it gives 1.9.3 back. The Command-T works fine too.
When I try and use the same Command-T in MacVim it crashes and the Terminal says:
Vim: Caught deadly signal SEGV
Vim: Finished.
I did a brew install macvim while in 1.9.3, but when I launch mvim from Terminal and run :ruby puts RUBY_VERSION I get back 1.8.7. I know Wincent recommends the system version of Ruby for installing Command-T and I've read you have to match up the Ruby version either way. I've managed to get it working for both when I had the system ruby, but can't get it for both on the RVM version with 1.9.3...
Is it possible? Should I just forget about MacVim and stick with Vim in the Terminal?
Other things I thought I could do would be to have a disabled folder and just move the different Command-T installations in and out of it. Or maybe do an if for 'gui_running' and target the different installs. Any advice to set me straight would be great.
I've installed Tim Pope's rvm.vim and can set the Ruby version, but that doesn't seem to stop the crash in the MacVim when I call :CommandT.
I'm guessing that you installed the macvim package before you installed installed all the rest of that, and then installed the vim package afterwards. That'd explain why it works in terminal mode. These are two different packages, and they have their own build options.
Run:
vim --version
And compare the output to:
mvim --version
In particular, check out the last line (starts with Linking:). You'll probably see ruby-1.8 linked in for mvim, and ruby-1.9.1 linked in for vim (note that 1.9.3 reports 1.9.1; it's the C API version, not the Ruby version).
If all this is true, fix it by doing:
brew uninstall macvim
brew install macvim
It should build against your 1.9.3 config. Make sure rvm current reports 1.9.3 before you do that.

Resources