{"thread":{"id":"21211","subject":"git refuses to work with gvim","startedAt":"2009-10-12T11:43:12Z","lastAt":"2009-10-12T18:29:43Z","messageCount":8,"participants":["sebastian@coli.uni-sb.de","Matthieu Moy","Shawn O. Pearce","Felipe Contreras","Markus Heidelberg","Joshua Roys"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"124690","messageId":"20091012134312.236d250e@gzip.coli.uni-saarland.de","threadId":"21211","inReplyTo":null,"subject":"git refuses to work with gvim","fromName":"","fromEmail":"sebastian@coli.uni-sb.de","sentAt":"2009-10-12T11:43:12Z","receivedAt":"2009-10-12T11:43:12Z","isPatch":false,"sender":{"key":"sebastian@coli.uni-sb.de","avatar":null},"body":"Hi,\na few days ago I decided to switch from vim to gvim. To make use of\nthis in most cases I added :gui to my .vimrc which should make most\napplications automatically switch to use gvim if they used the vim\ncommand before.\n\nBut git seems to have problems with this. If I do now a \"git commit\nsomething\" not the gui is opened but the console-version of vim. I\ncould live with that for git but if I now type some commit-message in\nthe console-version and do :x or :wq I get an error-message:\n\n# git commit something\nfatal: no commit message?  aborting commit.\n#\n\nAlso\n\n# EDITOR=gvim git commit something\nfatal: no commit message?  aborting commit.\n# \n\nshows the same error.\n\nRemoving :gui from my .vimrc makes git behave normally again. I don't\nknow what the problem here is: vim or git or both toghether?\n\nI already saw screenshots of people using git with gvim. So there is a\nway to make them work together but what am I missing?\n\n\nOS: Debian Lenny\nvim: 7.1\ngit: 1.5.6.5\n\ngreetings\n"},{"id":"124692","messageId":"vpq8wfgg4u1.fsf@bauges.imag.fr","threadId":"21211","inReplyTo":"20091012134312.236d250e@gzip.coli.uni-saarland.de","subject":"Re: git refuses to work with gvim","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2009-10-12T12:43:50Z","receivedAt":"2009-10-12T12:43:50Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"sebastian@CoLi.Uni-SB.DE writes:\n\n> # git commit something\n> fatal: no commit message?  aborting commit.\n> #\n\nThe problem is that gvim returns immediately, and lets the window\nopened (try it in a terminal, \"gvim foo.txt\" returns immediately). Git\nexpects the commit message to be written and saved when $EDITOR\nreturns.\n\nA quick search for \"wait\" in the man pages tells me that\n\n  GIT_EDITOR='gvim -f' git commit \n\nworks.\n\n(BTW, this is in no way specific to Git, 99% applications calling\n$EDITOR will expect the same behavior)\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"124696","messageId":"20091012141334.GE9261@spearce.org","threadId":"21211","inReplyTo":"vpq8wfgg4u1.fsf@bauges.imag.fr","subject":"Re: git refuses to work with gvim","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-10-12T14:13:34Z","receivedAt":"2009-10-12T14:13:34Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:\n> The problem is that gvim returns immediately\n...\n> (BTW, this is in no way specific to Git, 99% applications calling\n> $EDITOR will expect the same behavior)\n\nThe sad part is, every gvim user blames Git.\n\nEvery single one of my coworkers who uses Linux had gvim as their\ndefault $EDITOR and found git commit working sometimes, and not\nworking others.  Since git was new to them, they blamed git, not\ntheir $EDITOR.  They also felt insulted when I told them their\n$EDITOR was busted and should be replaced.\n\nSomeone needs to whack gvim upside the head and fix that program\nto behave correctly.\n\n-- \nShawn.\n"},{"id":"124698","messageId":"94a0d4530910120720pccaa920n7ab407494473ac7b@mail.gmail.com","threadId":"21211","inReplyTo":"20091012141334.GE9261@spearce.org","subject":"Re: git refuses to work with gvim","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2009-10-12T14:20:19Z","receivedAt":"2009-10-12T14:20:19Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Mon, Oct 12, 2009 at 5:13 PM, Shawn O. Pearce <spearce@spearce.org> wrote:\n> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:\n>> The problem is that gvim returns immediately\n> ...\n>> (BTW, this is in no way specific to Git, 99% applications calling\n>> $EDITOR will expect the same behavior)\n>\n> The sad part is, every gvim user blames Git.\n>\n> Every single one of my coworkers who uses Linux had gvim as their\n> default $EDITOR and found git commit working sometimes, and not\n> working others.  Since git was new to them, they blamed git, not\n> their $EDITOR.  They also felt insulted when I told them their\n> $EDITOR was busted and should be replaced.\n>\n> Someone needs to whack gvim upside the head and fix that program\n> to behave correctly.\n\nHuh? What is wrong about 'gvim --nofork'?\n\n-- \nFelipe Contreras\n"},{"id":"124702","messageId":"20091012142523.GH9261@spearce.org","threadId":"21211","inReplyTo":"94a0d4530910120720pccaa920n7ab407494473ac7b@mail.gmail.com","subject":"Re: git refuses to work with gvim","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-10-12T14:25:23Z","receivedAt":"2009-10-12T14:25:23Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> wrote:\n> On Mon, Oct 12, 2009 at 5:13 PM, Shawn O. Pearce <spearce@spearce.org> wrote:\n> >\n> > Someone needs to whack gvim upside the head and fix that program\n> > to behave correctly.\n> \n> Huh? What is wrong about 'gvim --nofork'?\n\nThe fact that its a command line option that isn't the default.\ngvim's UI here is as bad as pre 0.99 git.\n\nPeople do:\n\n\texport EDITOR=gvim\n\nand things work OK for a while, as they always open a new editor,\nwork with the file, and then close it, killing the only running gvim\nsession.  Since gvim waits if its the only gvim process running,\nthings seem fine.  But days later when you leave a file open,\nsuddenly the command calling $EDITOR starts failing.\n\nI've seen it happen to a lot of people.  They just start complaining\nabout how one day \"git commit\" is fine, and the next day its\nnot working.  But its been weeks since they selected gvim as their\n$EDITOR and they can't connect the open editor window as the problem\nwith that Goddamn Idiotic Truckload of s**t they are forced to use.\n\n-- \nShawn.\n"},{"id":"124706","messageId":"94a0d4530910120736p4cc310c0id08765ab5f10d0a3@mail.gmail.com","threadId":"21211","inReplyTo":"20091012142523.GH9261@spearce.org","subject":"Re: git refuses to work with gvim","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2009-10-12T14:36:50Z","receivedAt":"2009-10-12T14:36:50Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Mon, Oct 12, 2009 at 5:25 PM, Shawn O. Pearce <spearce@spearce.org> wrote:\n> Felipe Contreras <felipe.contreras@gmail.com> wrote:\n>> On Mon, Oct 12, 2009 at 5:13 PM, Shawn O. Pearce <spearce@spearce.org> wrote:\n>> >\n>> > Someone needs to whack gvim upside the head and fix that program\n>> > to behave correctly.\n>>\n>> Huh? What is wrong about 'gvim --nofork'?\n>\n> The fact that its a command line option that isn't the default.\n> gvim's UI here is as bad as pre 0.99 git.\n>\n> People do:\n>\n>        export EDITOR=gvim\n>\n> and things work OK for a while, as they always open a new editor,\n> work with the file, and then close it, killing the only running gvim\n> session.  Since gvim waits if its the only gvim process running,\n> things seem fine.  But days later when you leave a file open,\n> suddenly the command calling $EDITOR starts failing.\n\nI've never seen it happening. For me either it aways fails (fork) or\nalways work (nofork).\n\n> I've seen it happen to a lot of people.  They just start complaining\n> about how one day \"git commit\" is fine, and the next day its\n> not working.  But its been weeks since they selected gvim as their\n> $EDITOR and they can't connect the open editor window as the problem\n> with that Goddamn Idiotic Truckload of s**t they are forced to use.\n\nYeah, it happened to me too, but eventually I realized what was\nhappening. I like gvim's default behavior tough.\n\nI personally don't see any problem... how about other SCMs?\n\n-- \nFelipe Contreras\n"},{"id":"124720","messageId":"200910121937.24376.markus.heidelberg@web.de","threadId":"21211","inReplyTo":"20091012134312.236d250e@gzip.coli.uni-saarland.de","subject":"Re: git refuses to work with gvim","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-10-12T17:37:23Z","receivedAt":"2009-10-12T17:37:23Z","isPatch":false,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"sebastian@coli.uni-sb.de, 12.10.2009:\n> Hi,\n> a few days ago I decided to switch from vim to gvim. To make use of\n> this in most cases I added :gui to my .vimrc which should make most\n> applications automatically switch to use gvim if they used the vim\n> command before.\n> \n> But git seems to have problems with this. If I do now a \"git commit\n> something\" not the gui is opened but the console-version of vim.\n\ngit probably calls vi and not vim. Maybe vi doesn't respect your .vimrc?\n\n> OS: Debian Lenny\n\nDoesn't install Debian a vim-tiny package for vi without gui and another\nfor vim?\n\nMarkus\n"},{"id":"124728","messageId":"4AD37597.3010807@gmail.com","threadId":"21211","inReplyTo":"vpq8wfgg4u1.fsf@bauges.imag.fr","subject":"Re: git refuses to work with gvim","fromName":"Joshua Roys","fromEmail":"roysjosh@gmail.com","sentAt":"2009-10-12T18:29:43Z","receivedAt":"2009-10-12T18:29:43Z","isPatch":false,"sender":{"key":"roysjosh@gmail.com","avatar":null},"body":"On 10/12/2009 08:43 AM, Matthieu Moy wrote:\n> sebastian@CoLi.Uni-SB.DE writes:\n>\n>> # git commit something\n>> fatal: no commit message?  aborting commit.\n>> #\n>\n> The problem is that gvim returns immediately, and lets the window\n> opened (try it in a terminal, \"gvim foo.txt\" returns immediately). Git\n> expects the commit message to be written and saved when $EDITOR\n> returns.\n>\n> A quick search for \"wait\" in the man pages tells me that\n>\n>    GIT_EDITOR='gvim -f' git commit\n>\n> works.\n>\n> (BTW, this is in no way specific to Git, 99% applications calling\n> $EDITOR will expect the same behavior)\n>\n\nHello,\n\nAlso, a :help nofork leads to gui-fork and guioptions, which tells you \nthat you can add the following to .vimrc (not .gvimrc, see :help go-f):\nset guioptions+=f\n\n--\nJoshua Roys\n"}]}