`e` and `ee`

How many times have you typed something like atom .gitignore or code my-project to open a specific file or folder in your editor? And how many times have you typed code . to open the current folder in your editor? I personally do that one a ton.

Not only is that too many characters to type, what happens when you decide that Atom is slow and it’s time to move to Visual Studio Code? You’ve got to retrain yourself to use a different four character command each time you open a file or directory.

Screw that. Set up an alias:

Fish: alias e "code"
Bash: alias e="code"

Now you can type e my-project or e .gitignore to open a file or folder. And when you decide to give a new editor a try you can change your alias to point to you editor du jour and continuing just typing e at the command line. With this alias, opening your current directory is as easy as typing e .. But that’s not easy enough for me. It’s three whole characters when you count the space. And the E key and period key are on different sides of the keyboard! Wahhh! So set up a second alias:

Fish: alias ee "e ."
Bash: alias ee="e ."

Every time I type ee to open the current directory, I smile. At least on the inside. And you will, too.