How to configure gedit as git core.editor?

后端 未结 2 1503
無奈伤痛
無奈伤痛 2020-12-28 16:10

I have gedit configured as git core.editor.

git config --global core.editor \"gedit\"

This works fine unless there is already a gedit windo

相关标签:
2条回答
  • 2020-12-28 16:20

    All credit to VonC answer, but the -w makes gedit (3.18) crash on my ubuntu 16.04. Works fine without though:

    git config --global core.editor "gedit -s"
    
    0 讨论(0)
  • 2020-12-28 16:39

    The simplest way to solve this would be to upgrade gedit (which is at 3.8.3 with an Ubuntu 13.10)

    In 3.x, -s (standalone) and -w (wait) are available.
    That allows for (as commented by Fortisimo):

    git config --global core.editor "gedit -w -s" 
    

    As Gábor Lipták comments below, this works with gedit3, which is installed with:

    sudo apt-get install gedit-common/trusty 
    sudo apt-get install gedit/trusty
    

    (on Linux Mint)

    0 讨论(0)
提交回复
热议问题