4 ms·
Top of my head, I am pretty sure that I can do that with a "keyboard macro" involving list-matching-lines, and delete-matching-lines (that is literally what the
by anyfoo 5y ago
Top of my head, I am pretty sure that I can do that with a "keyboard macro" involving list-matching-lines, and delete-matching-lines (that is literally what the commands are called). "Keyboard macro" by the way is a good and a bad name at once: It does not fully describe the vastly more powerful feature, as it is much more semantic than just repetition of keystrokes, but at its surface it looks like that and helps you get started.
If anyone reading this hasn't used keyboard macros in emacs, try it out the next time you do something repetitive. It's amazing how it can simplify those tasks. "C-x (" to start defining one, "C-x )" to end it, "C-x e" to run it, which conveniently also ends definition if you want to use it right away. Of course you can do things like "M-5 C-x e" to run it 5 times.
But I do get your point: Things are probably much less discoverable in emacs, unless you are relatively proficient in it already maybe. You need to switching into a "programmer" mind fairly quickly, while BBedit probably just lets you do powerful stuff through simple UI.
- zrail 5y agoOnce you've hit C-x e once you can keep bouncing e to repeat the macro as well.
- anyfoo 5y agoThanks for the reminder. I knew that once, but completely forgot about it!
- frosted-flakes 5y agoUsing non-standard notation for describing keyboard shorcuts doesn't help.
- anyfoo 5y agoThis is the notation that emacs has been using forever, and also displays to the user, so every user should be well comfortable with it. It even says “Press C-x C-c to exit emacs” at startup.
- frosted-flakes 5y agoIt's still non-standard, and is yet another barrier to adoption.
- opan 5y agoI found it handy and I often use it outside of emacs as well when describing shortcuts to people. Mainly C-something for ctrl.