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.
Related
I'm using Vim in combination with mono for ASP.NET development. The OmniSharp plugin requires python 2 support.
This suggest the vim.nox-py2 distribution. But vim.nox-py2 does not include the system clipboard support (-xterm_clipboard), which I find quite essential.
The vim.gtk3 distribution does include support for the system clipboard (+xterm_clipboard) but it doesn't have python 2 support.
Is there a way to have Vim support both python2 and the system clipboard in Ubuntu 16.04?
+xterm_clipboard doesn't provide "support for the system clipboard"; it's +clipboard that does. You get that feature with any vim-gtk*/vim-gnome* package.
$ apt list vim gives you a list of Vim packages. Among them you have these three packages that all satisfy your requirements:
vim-gnome-py2
vim-gtk-py2
vim-gtk3-py2
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.
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.
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 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"