Opening a file in your favourite editor from the command line

This post serves as a reminder for myself.

I use the very capable e-text editor pretty much as my notepad replacement. I also spend a fair bit of time in console windows, and require a quick command to edit files using E.

I create a batch file called “e.bat” in %SYSTEMROOT%System32 and pop the following inside the file:

@start c:progra~1ee.exe %1 %2 %3

The added benefit is that this works from within a cygwin or msysgit console, too.

Another way would be to add e to the path, but i don’t think that’s really necessary – the path gets unwieldy and unmanageable quite easy.

3 comments

  1. I’m an e guy as well, it’s the best editor i’ve found for windows. Just a quickie, in your batch file you can have
    @start c:progra~1ee.exe %*
    which will copy all the args along.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>