Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to change or add the ability to open files when working with mingw32 with a different text editor ( in my case sublime text 2 ) I have been googling around but I'm not sure i understand how to do this.

I would like to be able to do the following from the command line:

$ st textfile.text -- where st is a command to use st2 to open the textfile.

you can already do this with vim

I'd appreciate any pointers.

thanks in advance

share|improve this question
up vote 1 down vote accepted

Try setting the editor variable, as described here.

share|improve this answer
does mingw32 have a .bashrc file? I have been unable to find it – user61629 Feb 23 '13 at 0:38

If the sublime text 2 application is named st.exe, add the directory where it is to PATH. Doing it only for mingw32 should be possible with adding it in your .bashrc like:

export PATH=$PATH:<msyspath-to-st-directory>

But you could aswell add it to Environment variables in Windows to make it work in cmd.exe aswell.

share|improve this answer
does mingw32 have a .bashrc file? I have been unable to find it. – user61629 Feb 23 '13 at 0:37
not by default (probably), but you can create one.. if so it should be wherever your HOME directory is. But I suggest you change PATH in Windows Environment variables instead. – Joakim Elofsson Feb 24 '13 at 14:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.