Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Janis Papanagnou Newsgroups: comp.unix.programmer,comp.lang.misc,comp.editors Subject: Re: Python (was Re: I did not inhale) Date: Thu, 29 Aug 2024 04:30:16 +0200 Organization: A noiseless patient Spider Lines: 25 Message-ID: References: <20240815182717.189@kylheku.com> <20240826083330.00004760@gmail.com> <20240826155113.000005ba@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Date: Thu, 29 Aug 2024 04:30:18 +0200 (CEST) Injection-Info: dont-email.me; posting-host="37bf894888e16e3dd8f612469928b931"; logging-data="4017740"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19xsFacpCyiijQwerzydnzU" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cancel-Lock: sha1:2JVwzwvxgqgiZEwC+OIItb1S2eo= In-Reply-To: X-Enigmail-Draft-Status: N1110 Bytes: 3332 On 29.08.2024 03:22, Lawrence D'Oliveiro wrote: > On Thu, 29 Aug 2024 02:29:55 +0200, Janis Papanagnou wrote: > >> If there's only >> primitive editing commands available (i.e. selection by mouse, or long >> clumsy keyboard sequences) it may be irrelevant whether you indent code >> in a Python or in a "C" program. If you're using editors like Vi that >> block selection can be done with '%' and the indent with '>%' and the >> reverse indent with '<%' (without the quotes); but that works only if >> you have the syntactical elements (the braces, parenthesis, brackets) as >> definition of the program block. That won't work for a block in a >> language like Python where blocks are defined by layout (by the grade of >> indentation); then you'd have to resort to the primitive editors' >> selection features, mouse/menus or more laborious keyboard commands. > > I have Emacs commands defined to jump quickly between lines with matching > indentation. That lets me easily select entire statement blocks in Python. I'm sure you have. - But wasn't that the point someone made upthread: "Writing editor editor macros in order to work around fundamentally bad language design is not something a programmer should have to waste time on." [Muttley@...] - I'm just feeling lucky with brackets and Vi. YMMV. Janis