Sublime Forum

Best setting for EDITOR env variable?

#1

Hi, hopefully simple question here:

I want to use Sublime Text 2 as my default system editor, so that (for example) Git will allow me to edit commit messages with sublime. I added the following to my bash rc file:

export EDITOR=“sublime -nw”

This works fine if I already have Sublime running – it starts a new window, and waits until that window is closed to see what I typed. However, if Sublime is not running, it also starts a window with my most recent project open, and waits until that window is also closed. This is quite irritating. Does anyone have a command-line invocation to start Sublime without automatically loading the most recent project?

1 Like

#2

I also ran into this last year & requested some method of dealing correctly with this situation.

I opened a feature request on UserEcho: Add --new-instance and --noremembered files. But it hasn’t gotten any response or user traction. Apparently, very few other users care about it, as the feature has only gotten 7 cumulative votes in the last 10 months.

Take a look, vote, and tell others about it as well. Maybe, it will start to generate more interest and they’ll add the capability in the next version.

0 Likes

#3

OK, I voted for your feature request. I’ll post here if I can figure out a workaround (for the time being).

0 Likes

#4

FWIW I voted for this request as well. It drives me crazy that I can’t use Sublime for this kind of one-off editing.

0 Likes

#5

I’ve opened this issue on the new volunteer-run bug tracker:

[github.com/SublimeText/Issues/issues/28](https://github.com/SublimeText/Issues/issues/28)

I have no idea if jps is paying any attention to that effort.

0 Likes

#6

[quote=“mwb1100”]I’ve opened this issue on the new volunteer-run bug tracker:

[github.com/SublimeText/Issues/issues/28](https://github.com/SublimeText/Issues/issues/28)

I have no idea if jps is paying any attention to that effort.[/quote]

i would hazzard a guess that he is probably paying attention… this doesnt guarantee he will address any of the issues noted there :smile:

0 Likes

#7

Yeah, it would be nice to have subl stand in for nano on all these little one-off editing sessions that crop up.

0 Likes

#8

If anyone comes to this (old) thread looking for a solution, I finally found a workaround:

stackoverflow.com/questions/1459 … on-macos-x

I can’t upvote that one enough times!

0 Likes