3 ms·
Some useful tricks in there. Also, this: ggVGg? : rot13 whole file (toggles) So g?<motion> applies ROT13 to text. But... why? Edi
by andrey-p 12y ago
Some useful tricks in there.
Also, this:
ggVGg? : rot13 whole file (toggles)
So g?<motion> applies ROT13 to text. But... why?
Edit: Make that "a couple of useful tricks in there". These are the ones I can actually see myself using:
@@ last recording
@: last command-mode command
- skymt 12y agoAt a guess: the old-fashioned Unix way of composing mail and Usenet messages is to have your client call your editor. Rot13 was (is?) common in Usenet discussions of fiction to avoid posting spoilers where anyone can accidentally read them. It's not something you would use when editing source code.
- andrey-p 12y agoYou know when you read someone's comment and then your immediate thought is "I'm way too old to appreciate this"? I read your comment and thought the exact reverse. I'm way too young to appreciate this. Thanks for the insight!
- dllthomas 12y ago"old-fashioned Unix way of composing mail and Usenet messages is to have your client call your editor" Some of us still do that. I <3 nmh.
- voltagex_ 12y agoWhat's nmh? I must admit to setting $EDITOR to nano for mutt.
- dllthomas 12y agonmh is a mail client that is decomposed into a bunch of shell utilities, storing state and messages in files. It's a bit awkward trying to use it directly, but easy to wrap things you do commonly in aliases/functions. Editing of messages, of course, takes place in your $EDITOR, but listing of messages, selecting of messages, &c, doesn't leave your shell like it does with mutt (so you can use the pieces as part of arbitrary pipelines, as is good and proper).
- voltagex_ 12y agoI wish Reddit would implement that.
- dllthomas 12y agoAre you asking the mechanism? It's because ? is defined as an action to rot13 the selected text. Are you asking the motivation? I presume it's because someone wanted to be able to easily obscure things like spoilers in messages to mailing lists. As a mnemonic, it doesn't seem unreasonable.
- Fishkins 12y agoJust a nitpick, but applying a command to the whole file can be done faster with ggg?G That also has the benefit of working with plain vi, since vi doesn't support visual mode. I didn't know about the rot13 command. I probably won't ever use it, but I think it's fun that it exists.