Git fixing vimfiles errors

I follow the simple git guide in the nettuts easy git guide

I initialized an empty git instance in my ~/ directory and then added my .vimrc and my .vim/ files.

 git add .vimrc git add .vim 

However, when I execute the git commit command, I get messages that are not related to the error.

 sayth@linux-kt34:~> git commit Error detected while processing /home/sayth/.vimrc: line 203: E319: Sorry, the command is not available in this version: py << EOF line 204: E492: Not an editor command: import os.path line 205: E492: Not an editor command: import sys line 206: E492: Not an editor command: import vim line 207: E15: Invalid expression: 'VIRTUAL_ENV' in os.environ: line 224: E171: Missing :endif Press ENTER or type command to continue 

If I press the enter button, I get the file. What am I doing wrong with this.

EDIT: removed virtualenv ref from .vimrc . I never noticed an error because I used gvim, which never violated the error.

+4
git vim
source share
2 answers

When you run git commit without specifying a git commit message on the command line, it will start the editor (in your case vim ) so that you can enter it. Those errors that you see are from vim , saying that you have errors in your .vimrc file. You should get the same errors if you just run vim normally.

+5
source share

Your vim installation does not have python support. If you run the command

 vim --version | grep python 

you should see +python , otherwise it means that python is missing from the vim installation.

+3
source share

All Articles