Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do I do to get vim working again?

Tags:

vim

makefile

make test from within ../vim/src seems to have disabled vim. Nor can I recompile from source.

What do I do to get vim working again?

Longer Explanation:

From terminal on a Mac OSX 10.10.4. I was attempting to modify the configuration of vim with the goal of enabling the ability to copy/paste from my system clipboard and also to enable python3 encoding.

The code for vim was compiled from source that I cloned from the git repository.

git clone https://github.com/vim/vim.git

I also set it so my version of vim would run instead of the system vim, by adding the following to my .bashrc file

alias vim='/the/path/to/my/version/of/vim'

After tweaking my ./configure command I ran it as follows.

./configure --with-features=huge --enable-perlinterp=yes --enable-pythoninterp=yes --enable-python3interp --enable-multibyte --enable-gui=auto --with-x 
make
make install

from within vim I typed

echo get('python3')

and was pleased to see a "1" indicating that I now had python3 support.

However, when I asked for the version in the command line

vim --version

I saw that xterm_clipboard was still not enabled.

I hunted around a bit more and saw the suggestion to make test on the python3 install page. I did that, still from within the ../vim/src folder, and it ran for a couple of minutes, occasionally with bright red errors. I then tried to open vim, but received the following error message followed by a prompt:

vim
-bash: /mypath/../src: is a directory

So I did a git pull and recompiled from source without any error messages. However vim still failed to open, with the same error message.

command -v vim

yielded the path to vim that I had previously assigned in my .bashrc file.

like image 266
BrianWilson Avatar asked Oct 26 '15 17:10

BrianWilson


1 Answers

The simple answer if vim is not working is to start a new shell, especially after updating the .bashrc file. Updates to the .bashrc file are only applied to future bash sessions.

Lessons learned:

I should not have done a

make test

When recompiling from code, use

make clean

Caveat In the end, it is possible that an attempt to install macvim via brew (failed due to a conflict with macports) is what solved the problem, for it was after this attempt (and in a new session) that I was able to open vim again.

like image 181
BrianWilson Avatar answered Nov 15 '22 00:11

BrianWilson