2

Is there any way to use Gedit as the core.editor for Git in Windows?

citizen conn
  • 15,011
  • 3
  • 54
  • 78
Sean
  • 1,079
  • 16
  • 27
  • You don't have to give a reasoning for why you like GEdit / support GEdit... – manojlds Jul 18 '11 at 23:45
  • 1
    Since this doesn't seem related to Vim, I've removed the `vim` tag. – Greg Hewgill Jul 19 '11 at 00:00
  • 3
    I've removed your reasonings, and left the simple question. You'll have more luck getting an answer that way. – citizen conn Jul 19 '11 at 00:03
  • Do you have gedit installed in your windows machine? – yasouser Jul 19 '11 at 02:01
  • @manojlds, @greg, @citizen conn...y'all are right: smarter to keep it succint. Thanks. Just wanted to make it clear I had scoured the other Gedit in Git posts in SO. @yasouser: yes...I have Gedit installed in a dual boot machine. I'm increasingly working in Windows vs. Ubuntu, however. – Sean Jul 19 '11 at 05:27

2 Answers2

3

Add your gedit bin directory to environment variable %PATH%, then configure git core.editor "gedit"

bilo
  • 71
  • 2
  • can you be a li'l more detailed in your response? I found this on SO: http://stackoverflow.com/questions/550490/how-can-i-put-home-opt-git-bin-to-my-path Still a bit confused. Should the %PATH% for Git begin from a high enough directory (e.g., Prog Files (x86) / Git / .. that it contains BOTH the git AND the gedit executables? Or just randomly insert directory of Gedit's executable anywhere in path? AND: the change must be done via Git console, yes? (...and not via direct edit of a file in a Git directory...like using an editor to adjust the git-config file?) – Sean Jul 20 '11 at 05:16
  • Just add the path that contains gedit executables to %PATH%, you can do this via System Properties (right clicking My Computer, Adv. sys. settings) > Env. Variables > Sys. Variables, Path, edit > add e.g., ";C:\Opt\Gedit\bin" Finally, `configure git core.editor "gedit"` on your Git console. You can even run gedit by typing "gedit" directly on the console. – bilo Jul 20 '11 at 07:23
2

Though this question doesn't answer your question directly, it does talk about setting up an editor to work with Git for Windows: How can I set up an editor to work with Git on Windows?

This question might also be useful for you incase you run into problems while changing the default editor: Unable to change the default editor in terminal

Community
  • 1
  • 1
yasouser
  • 4,883
  • 2
  • 24
  • 38