Opening a file in your favourite editor from the command line

July 28th, 2009 by Xerxes Leave a reply »

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. Command Line Replacement for Gitk It’s no surprise I love git. To date, the worst...
  4. Viewing a File’s History in Git To view the full history of a file in your...
  5. Run a command as Administrator under Windows To run any command under the credentials of a different...

3 comments

  1. Dave Newman says:

    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. Xerxes says:

    nice one – didn’t know that. cheers!