Comment configurer gedit comme git-core.l'éditeur?
J'ai gedit configuré comme git-core.de l'éditeur.
git config --global core.editor "gedit"
Cela fonctionne bien, sauf s'il existe déjà un gedit fenêtres ouvertes. Dans ce cas, COMMIT_EDITMSG est ouvert dans la fenêtre existante et gedit retourne immédiatement. Git se retrouve avec un vide message de commit et échoue.
Ce site (http://fabianschuiki.wordpress.com/2012/05/20/use-gedit-as-git-editor/) suggère d'utiliser "gedit -s -w", mais je n'ai pas ces options (et de --nouveaux-fenêtre ne fonctionne pas):
$ gedit -V
gedit - Version 2.28.4
$ gedit --help
Usage:
gedit [OPTION...] [FILE...] - Edit text files
Help Options:
-h, --help Show help options
--help-all Show all help options
--help-gtk Show GTK+ Options
--help-sm-client Show session management options
Application Options:
-V, --version Show the application's version
--encoding=ENCODING Set the character encoding to be used to open the files listed on the command line
--list-encodings Display list of possible values for the encoding option
--new-window Create a new toplevel window in an existing instance of gedit
--new-document Create a new document in an existing instance of gedit
--display=DISPLAY X display to use
OriginalL'auteur Demyn | 2013-10-18
Vous devez vous connecter pour publier un commentaire.
La façon la plus simple de résoudre ce serait pour mettre à niveau
gedit
(qui est au 3.8.3 avec une Ubuntu 13.10)En 3.x,
-s
(autonome) et-w
(attendre) sont disponibles.Qui permet (comme commenté par Fortisimo):
Comme Gábor Lipták commentaires ci-dessous, cela fonctionne avec gedit3, qui est installé avec:
(sur Linux Mint)
git config --global core.editor "gedit -w -s"
bon point. J'ai compris votre commentaire dans la réponse pour plus de visibilité.
Pour installer gedit 3 pour linux mint: sudo apt-get install gedit-commune/trusty sudo apt-get install gedit/trusty
De mes tests, seulement
-s
est nécessaire.J'ai eu le même problème sur Ubuntu 18.10. En utilisant simplement
-s
fonctionne parfaitement pour moi. Merci @VonCOriginalL'auteur VonC
Tout le crédit à VonC réponse, mais le
-w
fait gedit (3.18) crash sur mon ubuntu 16.04. Fonctionne très bien sans:Il ne se bloque lorsque vous combinez -w et-s. Les deux -w et-s de travail lorsque utilisé de manière indépendante. Mais il semble qu'-s implique -w...
OriginalL'auteur Arnaud P