I learned the vim keys because I played nethack on a laptop
To be fair, vim is not my main editor/ide at work because I work in java and it's pretty hard to set up all the automatic compilation/dependency crap in vim. And I definitely think vim isn't for everyone. Every tool has some pros and cons and usually its best to use whatever you like best rather than try to force it.
But I do use the posix toolchain a lot at work, and it's way more powerful than any ide's search/replace functionality.
Two examples that come to mind:
1. I had a huge (multiple gigabites) svn repository that I needed to search for every text file that was encoded in the iso-8859-1 and convert them to utf-8. I have no idea how you would accomplish that on windows without writing custom software.
It was 4 lines of bash scripting using find, grep, cut and iconv. All small tools that do one thing and do it well
2. I needed to find all files that contained a tab character in my repo.
did the trick. I knew what -R did but not the other flags but it took me 5 seconds to google it. I'm sure you can do this as well in an editor, but then you'd probably need to import all the files into a new throwaway project.
Then I hit a snag. It was returning a lot of binary files which I didn't want. So I piped it into another grep and got what I wanted:
Code:
grep -lRP "\t" | grep -E "js|html|css"
Last edited by Wolfram; 04-05-2018 at 11:34 AM.