0

I am having problems with setting sublime 3 as my default editor in git. I found some solutions on stackoverflow but I couldn't do it for some reason. Can anyone help me with it from the start to the end. Should I set any environment variables in order to make it work ? Thanks

1 Answers1

1

this is taken from the github help page:

git config --global core.editor "subl -n -w"

https://help.github.com/articles/associating-text-editors-with-git/

(also look at this answer to a similar question https://stackoverflow.com/a/25255676/2371600)

Community
  • 1
  • 1
bruceyyy
  • 409
  • 3
  • 14
  • I tried this. After I have done it when I run `subl file1` it says `subl: command not found`. Any ideas? – Robert Marczak Jun 19 '15 at 10:15
  • yeah if you look at the link to the similar question you need to link the subl command to your sublime 3 application :) – bruceyyy Jun 19 '15 at 10:28
  • Other link is for mac I think and I am using windows. I have tried diffrent options but I must be doing something wrong. Would you like to guide me from the start to the end. I would appreciate it. – Robert Marczak Jun 19 '15 at 12:16
  • ah ok my bad ... well according to this post there is a `subl.exe` file that you need to have included in your system path. The answerer recommends just moving the file to a folder already included. http://stackoverflow.com/a/25577833/2371600 – bruceyyy Jun 19 '15 at 12:34
  • Simpler: https://stackoverflow.com/a/9408117/568458 `git config --global core.editor "'c:/program files/sublime text 3/subl.exe' -w"` – user56reinstatemonica8 Oct 22 '18 at 09:21