how can change default text editor in mingw32

1

1

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

user61629

Posted 2013-02-22T15:14:56.633

Reputation: 375

Answers

2

Try setting the editor variable, as described here.

gronostaj

Posted 2013-02-22T15:14:56.633

Reputation: 33 047

does mingw32 have a .bashrc file? I have been unable to find it – user61629 – 2013-02-23T00:38:11.137

1

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.

Joakim Elofsson

Posted 2013-02-22T15:14:56.633

Reputation: 2 056

does mingw32 have a .bashrc file? I have been unable to find it. – user61629 – 2013-02-23T00:37:33.180

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 – 2013-02-24T14:48:11.313