The "loop and a half"

bartc bc at freeuk.com
Sat Oct 7 09:49:41 EDT 2017


On 07/10/2017 14:19, Steve D'Aprano wrote:
> On Sat, 7 Oct 2017 11:06 pm, bartc wrote:

> Ctrl-K to enter "operate on selected text" mode;
> Y to Delete
> Ctrl-K to enter "operate on selected text" mode;
> R to Read from a file (at last an actual mnemonic command!)
> enter a file name
> 
> That's five steps.

Are we counting steps or keystrokes?

> And now you have two "temporary" files, file and file2, which need to be
> deleted. Two more steps that you conveniently don't count.

Actually I keep a set of 9 scratch file names just for such purposes. So 
overwriting and deleting don't matter. (Apparently the names are 
offensive to some so I won't mention them, but they're easy to type.)

> And you think that memorising these non-standard keyboard shortcuts Ctrl-KW
> Ctrl-KY Ctrl-KR

I believe these used to be WordStar commands, if anyone can remember that.

  is better than memorising Ctrl-D which works across thousands
> of applications? Good for you. You probably would love Emacs, except other
> people use it, and therefore you will hate it.
> 
> 
> [...]
>> However, how hard would it for the editor to do its own sorting?
> 
> Yes, it is a mystery to me why so few editors include a "sort lines" function.

I don't know if you're being sarcastic here or not, so I don't know if 
you mean few editors have 'sort' or most of them do. Neither do I get 
the point you're making.

But it's a little ironic that it took less time to add such a feature 
than I spent writing about it in a post!

-- 
bart




More information about the Python-list mailing list