3 ms·
There are loads of other tricks. For example, say you have discovered that you need to delete an entire block of code. You could position your cursor on the o
by jandrese 5y ago
There are loads of other tricks. For example, say you have discovered that you need to delete an entire block of code. You could position your cursor on the opening or closing brace and type d$. This sounds arcane when you hear it (and to be fair it is to a degree), but once you realize that it's just a combination of navigation and action most of it becomes obvious.
- bradrn 5y agoDid you perhaps mean ‘d%’? IIRC ‘d$’ deletes to the end of the line.
- crubier 5y agoLol, exactly making my point thank you
- bradrn 5y agoQuite the converse, in fact I use vim mode whenever I can; I would struggle to think of a better way of editing text. (My current editor is Emacs+evil and I don’t anticipate changing it any time soon.) I strongly suspect GGP’s post was simply a typo, as ‘%’ and ‘$’ are right next to each other on the keyboard. And if I were to make that typo while editing a real document, I would need only the three keystrokes ‘ud%’ to undo it and then do the editing action I originally meant.
- jandrese 5y agoOf course I fat finger the example. LOL.