Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken git editor post installation #42

Closed
abhinavsingh opened this issue Aug 30, 2013 · 11 comments · Fixed by #64
Closed

Broken git editor post installation #42

abhinavsingh opened this issue Aug 30, 2013 · 11 comments · Fixed by #64
Labels

Comments

@abhinavsingh
Copy link

I gave maximum-awesome a shot and was pleased to see what it has to offer. However for some reasons, post installation my git commit editor is broken. Every time I try to write a commit message using git commit, it fails with following message:

There was a problem with the editor 'vi'. 
Please supply the message using either -m or -F option.

I am not sure what the problem is but would like to get this resolved without uninstalling maximum-awesome.

@sebdah
Copy link
Contributor

sebdah commented Aug 30, 2013

+1, I have the same problem with my commits.

@rudle
Copy link
Collaborator

rudle commented Aug 30, 2013

This happens when git receives a non-zero exit code from $EDITOR. Obviously, this is unintentional and is probably related to something specific to your system.

Make sure that there's nothing obviously broken with your vim setup - I'd start by taking a look at :mess to see if there are errors with any of your plugins.

@abhinavsingh
Copy link
Author

This error was only introduced after maximum-awesome installation. Probably one of the included plugin is faulty. In case it helps here is my system information:

$ uname -a
Darwin Abhinavs-MacBook-Pro.local 12.4.0 Darwin Kernel Version 12.4.0: Wed May  1 17:57:12 PDT 2013; root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64

Also :mess shows nothing.

@strongriley
Copy link
Collaborator

Does vim work regularly outside of git commit? Others have commented that opening Vim at all causes a SegFault. #34

@abhinavsingh
Copy link
Author

Yes vi, vim works perfectly outside of git commit editor. I don't see any SegFault. In case it helps, my ruby version:

$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]

@strongriley
Copy link
Collaborator

To rule some things out, can you replace the symlink ~/.vimrc with just an empty file and see if it's still causing problems? That'll determine whether it might be plugin-related or possibly MacVim-related. Thanks.

@xiaowl
Copy link

xiaowl commented Sep 1, 2013

Checkout this blog: http://tooky.co.uk/2010/04/08/there-was-a-problem-with-the-editor-vi-git-on-mac-os-x.html

Look at the first comment:

Paul Rosania • 3 years ago
If you are using Pathogen, you are probably calling filetype off at the beginning of your vimrc file. I found this to be the root cause -- if filetype is already off, calling filetype off causes a bad exit status.
Try adding filetype on right before filetype off and see if it fixes it. It did for me!

@abhinavsingh
Copy link
Author

@kevin4byte This certainly fixed my git editor. Can we kindly include this in the master repo?

$ git diff
diff --git a/vimrc b/vimrc
index 8e7ba42..2fc0226 100644
--- a/vimrc
+++ b/vimrc
@@ -1,4 +1,5 @@
 " set up pathogen, https://github.com/tpope/vim-pathogen
+filetype on
 filetype off
 call pathogen#infect()
 filetype plugin indent on

Thanks.

@sparecycles
Copy link
Contributor

👍

@sebdah
Copy link
Contributor

sebdah commented Sep 1, 2013

Works good for me after the #64 pull request.

@abhinavsingh
Copy link
Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants