I just keep finding more and more to love about my new text editor, e. For example, I just discovered that you can run selections of text through any given Linux command (using Cygwin). Here’s an example, using one of the most powerful and basic commands from Linux,
grep command in linux works like this: You give
grep a text file and a search term, and it outputs all of the lines of that text file which contain that term. So if you had list that looked like:
!!!Dessert List: * Apple Pie * Cherry Pie * Chocolate Cake * Chocolate Ice Cream * Pecan Pie * Pumpkin Pie * Vanilla Ice Cream
and you ran
grep "Pie" on that list, it would return with:
* Apple Pie * Cherry Pie * Pecan Pie * Pumpkin Pie
This command can be really, really useful when dealing with large text files. And you can run it in e without having to go to the Cygwin command prompt. Here’s how easy it is:
- Make a selection of text
- Go to the Text menu and select “Filter Through Command”
- Type the command
grep "[search term]"into the Command field and click Execute.
- Enjoy the newly filtered results.
And it works for a lot of linux commands. I just tried it with
ls which lists all of the files in a directory, and it spat out a list of all everything in the Start menu. I’m very impressed.
Since almost everything in linux is a text file, Linux users have developed a lot of simple but powerful tools that let you manipulate text in all kinds of useful ways. And now, with e, there’s an easy way to use those tools in the Windows (without resorting to the command line).