I want to install and use the YouCompleteMe Plugin for Vim. However, a part of the installation implies downloading clang 3.7, which is already a part of my current Ubuntu installation. Generally, wasting space on multiple versions of the same application on my file system is something I disregard, but now I'm also running dual-boot and don't have that much space left for a "casual" downloaded copy of clang just to make use of this plugin.
How can I make the YouCompleteMe to make use of the installation/libraries I already have, if possible at all?
Thanks.
Depending on your YCM install method, you will have to specify something like:
--system-libclang --system-boost
…as arguments to the install.py command.
Note that the YCM install docs strongly discourage the usage of system-libclang.
Related
I upgraded my system from ubuntu16.04 to ubuntu18.04,once I updated my system,I fond that my VIM could not be used.Whenever I use my VIM,the following mistakes will occur.
$ vim test.cpp
vim: error while loading shared libraries: libruby-2.3.so.2.3: cannot open shared object file: No such file or directory
What should I do?
Help me slove this problem,thanks!
If this is the default Vim installed via your package manager, that's not supposed to happen. Something's messed up, and I would attempt a complete purge and reinstall of the Vim packages.
If you've compiled Vim yourself (then it's typically installed as /usr/local/bin/vim, or under your home directory), you need to recompile it.
Vim typically isn't a static, standalone binary. Especially for the language interpreters (Perl, Python, Ruby), it links to them via shared libraries. You'll see some of this in the :version output.
On the positive side, this means that any fixes and enhancements automatically get into Vim as well. On the negative side, this means that if one of those dependent libraries get upgraded (as happens during a system upgrade) and the old version is lost, you have to recompile Vim, so that the new dependencies are incorporated into it. The also implies that it's not advisable to copy a self-compiled Vim to another Linux system (unless you're sure it's on the exactly same version), and compile on each system instead.
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.
In vim 7.3 on OSX, if I type
vim ~/myfiles
vim will put me into the Vim File Explorer for that directory, and I can open or rename files.
In vim 7.4 on Ubuntu, I get the unhelpful error message
"~/myfiles" is a directory
Looking through the compiled options (vim --version) and online documentation, I see no obvious way to activate this functionality through, say, a command-line or compile-time option. It is such a great feature of vim that I'm surprised it is not enabled on the version of vim available in the Linux package.
Use the :E command for the explorer mode.
The ability to edit a directory like this depends on a plugin. Most of the time, that plugin is the "netrw" plugin provided with Vim in the official runtime files. In Ubuntu (and Debian) you install that runtime separately so that every Vim package can use it rather than duplicating functionality. Try installing the vim-runtime package, and maybe a more feature-full Vim while you are at it, if you have not already done so.
To summarize and answer my own question...
File explorer functionality is actually provided by a plug-in, "netrw", which seems not to be installed by default in the two or three versions of vim I tried via apt-get.
Installing NERDTree solved the problem brilliantly - it can do so much more than the default explorer. I have not yet figured out how to rename a file using NERDTree - something that is easy with 'netrw', but that is a minor irritant and there is probably a way to do it.
I've got a Mac OS X Lion. And there's a vim, that is installed from macports. Unfortunately, it lacks a +keymap option. Is there a way I can install vim from macports with this additional option?
As far as I know, ports fetch vim sources and compile them. If so, there might be a way how to hold on ports installation process to introduce one small change to makefile. Do you know one?
Thanks a lot
Vim provides several feature sets, which can be selected by variants in MacPorts. The normal build does not include this keymap feature, you would need +big or even +huge.
For a new install:
sudo port install vim +big
Or, to add the +big variant to an existing installation:
sudo port -n upgrade --enforce-variants vim +big
Another option would be to just use CLI executable found in the latest MacVim build. I think it comes with this option.
I wanted to use cscope enabled vim - unfortuantely , the binaries at work are not compiled with cscope support , and when I tried building from src , I'm getting a lot of errors due to proper dev packages not being installed.
So , does anyone have a link where I can a precompiled binary with cscope support ? Btw , I'm using linux.
Just build your own vim binary from source code maybe a good solution ^_^
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.2.tar.bz2
tar xjf vim-7.2.tar.bz2
cd vim72
./configure --enable-cscope
make && make install
You will get a cscope supported vim 7.2
Not quite an answer to your request for a pre-compiled vim 7.2, but you said part of your compiling problems is that you "don't have the privileges for installing reqd packages" (in you comment to #chenkaie's answer). If the other reqd packages use configure, you can compile them to install into a directory you have control over, like this:
./configure --prefix=/dir/with/permissions
make && make install
configure-based installers support the --prefix switch, which results in the installed packages in locations like <prefix>\bin, <prefix>/lib, etc. With this trick you may be able to build all the reqd packages in order to build vim 7.2 itself.
If the reqd packages are not configure-based, you might want to look at the installer (makefile?) of the reqd package to see if it has an option similar to configure --prefix=<dir>
I have the default package Ubuntu gives me from doing an 'apt-get install vim', vim_1%3a7.1-138+1ubuntu3.1_i386.deb.
Inside of vim, when I type
:echo has('cscope')
it prints
1
as expected.
Granted, you do say you are looking for Vim 7.2 I don't know what improvements 7.2 has seen over 7.1, but it looks like there are still build problems with 7.2 that are being hammered out. I'd suggest just using 7.1 for the time being.