Git: Custom editor opens blank file
.bash_profile I put
export EDITOR="/usr/local/bin/sublime -w". Whenever I open a file in command line, it opens up as a blank file. After 2-3 attempts the file then shows information like it should.
- How do I use Notepad++ (or other) with msysgit?
- Git core.editor on Mac OS X
- How to change the text editor in git to Sublime - currently git commit commands are opening in Notepad
- What is this editor opened by “git commit --amend” in Windows 10 cmd and how do I use it?
- Multiple git editors
- Is there a text editor that will “pretty print” for display without changing the underlying text?
Did I set up something incorrect?
Any help appreciated. Thanks.
One Solution collect form web for “Git: Custom editor opens blank file”
This gist mentions:
-w doesn’t seem to be needed anymore; Actually adding it now inverses the way it worked.
Adding it, makes the terminal command exit before editing the file in sublime
Removing it, will properly make the sublime command to not exit until the file is closed.
Can just use this now (with no Sublime version):
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime
Check to see if
/usr/local/binis in your
Make sure it says:
Back in the terminal enter this to refresh the file:
Now you can type
sublimeto open up Sublime Text:
sublime .to open the current directory or
sublime some-file.txtto open the directory/file in Sublime Text.
Now, to set Sublime Text as the default editor set the EDITOR environment variable: