Back in my Engineer days, where I'd spend much of my time writing technical reports, I'd always remove the Insert key from my keyboard.
It's sitting there in that block of six keys that you use all the time when editing text (home, end, page up/down, delete), and it's a little timebomb. You would invariably hit it by accident at some point and change your editor into "overwrite all my stuff" mode.
It would usually take a minute or two of ruining your document before you realized what was happening and spent the next several minutes repairing the damage.
I would go years at a time without ever hitting that key on purpose, so I just kept it in a drawer, in case it ever needed using.
Now, as a developer, there's an Insert in tons of useful keyboard combos, so it needs to stay there. And laptops have ruined that old useful six-key block so it's a lot rarer to hit it by accident.
But it had no business being there. Fifteen years later, I'm still not a friend of that key.
Heh, as you can see from the other comments, I don't know all the vi commands either. Just a few essentials. I'd assumed from the comment you were a vi person and probably knew more vi than me.
I don't use vi for coding, just quick file edits on the console. I was xemacs for a very long time in college and thereafter - to the point of writing elisp to manipulate xml files, but eventually my Java day job pushed me towards a full IDE. Java is kinda unbearable without it.
I still occasionally turn to emacs for a few things I can't get elsewhere (editing binaries, large files, and doing search and replace in a narrowed buffer), but it's no longer my primary editor or mail reader. I may pick it up again for clojure coding, though.
Yeah, I'm a full IDE guy too but if I'm editing something that where that wouldn't make sense it's back to emacs with me. IntelliJ also supports emacs bindings. :)
‘cw’ isn't overwrite, ‘cw’ is change word. ‘R’ is overwrite. I use ‘r’ sometimes, mostly for things like ‘yypfxry’, but I can't remember the last time I used ‘R’.
I vaguely recall using it a few times back in the day to edit things like fixed-format columnar text files. Now that sort of thing is easier with years worth of accumulated knowledge of tools, but I wasn't born with that knowledge.
Before Ctrl+C and Ctrl+V to copy and paste, the usual method was Ctrl+Ins and Shift+Ins (and Shift+Del for cut), so this key did have a lot of use back in the day. These key combinations still work in most Windows software.
In DOS, these combos were used by Borland's Turbo Vision GUI toolkit (and they didn't offer Ctrl+C/V/X as alternatives). So everything written using that - and there was quite a bit, especially once you count LOB apps - had those shortcuts. In particular, all of Borland's own IDEs did, so those of us who learned to code C or Pascal on DOS in that era still got those shortcuts memorized.
Agreed — overwrite mode is something I basically never want and am always unhappily surprised to find it's switched on.
That's one of the things I like about using C-a, C-e, M-v & C-v, C-d instead of home, end, pgup, pgdn & Del — much less likely to accidentally hit the wrong key. And my hands don't have to fly so far from my keyboard!
Overwrite mode is basically a relic from the old fixed-width record days. We just need to think up a better use for the Insert key so people don't fall back on making it the overwrite toggle.
Maybe in a word processor it could bring up the "put a picture/graph/whatever" right here in this document?
>laptops have ruined that old useful six-key block
For what it's worth, my Thinkpad definitely isn't ruined--it has a five key block containing the other keys you mentioned. Insert is over to the right in a four-key row (along with PrtSc, ScrLk, and Pause) that's above F9-F12
It's sitting there in that block of six keys that you use all the time when editing text (home, end, page up/down, delete), and it's a little timebomb. You would invariably hit it by accident at some point and change your editor into "overwrite all my stuff" mode.
It would usually take a minute or two of ruining your document before you realized what was happening and spent the next several minutes repairing the damage.
I would go years at a time without ever hitting that key on purpose, so I just kept it in a drawer, in case it ever needed using.
Now, as a developer, there's an Insert in tons of useful keyboard combos, so it needs to stay there. And laptops have ruined that old useful six-key block so it's a lot rarer to hit it by accident.
But it had no business being there. Fifteen years later, I'm still not a friend of that key.