Occasionally I want to edit plain HTML file in Visual Studio. You know, those files with .htm or .html extension. Normally pressing Enter in Far Manager opens them in a browser. This is what I want most of the time, so let’s keep it.
Idea: let’s use F4 key to open file in Visual Studio.
Here’s how to achieve it:
* Open Commands menu, select File associations.
* Add new association, enter *.htm;*.html as a mask. Enter this command for F4:
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" /edit "!.!"
Change path to devenv.exe if you have different version of Visual Studio.
Note the /edit parameter. It makes Visual Studio to re-use existing window if it is alredy running. Visual Studio is not exactly a lightweight editor so let’s be efficient here.
What if you want to open HTML file in internal Far editor? Simple: press Alft+F4.
Reference: