Home > IT & Software > Opening a file in your favourite editor from the command line

Opening a file in your favourite editor from the command line

July 28th, 2009

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~1\e\e.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.

Bookmark this post:
  • DotNetKicks
  • DZone
  • TwitThis
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Live
  • MySpace
  • Slashdot
  • StumbleUpon
  • Technorati

Related posts:

  1. Switching an IIS website home directory from the command line The title says it all. The problem was simple –...
  2. e Text Editor: “ruby: no such file to load — ubygems (LoadError)” i’ve installed e text editor on my desktop and trying...
  3. Viewing a File’s History in Git To view the full history of a file in your...
  4. Run a command as Administrator under Windows To run any command under the credentials of a different...
  5. Instant Twitter Bookmark Tonight’s been a busy night for silly coding This first...

Xerxes IT & Software

  1. January 8th, 2010 at 06:45 | #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~1\e\e.exe %*
    which will copy all the args along.

  2. January 8th, 2010 at 08:16 | #2

    nice one – didn’t know that. cheers!

  1. March 10th, 2010 at 13:33 | #1