Deutsch English Français Italiano |
<vaofe4$3lv0c$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com> Newsgroups: comp.unix.programmer,comp.lang.misc,comp.editors Subject: Re: Python (was Re: I did not inhale) Followup-To: comp.editors Date: Thu, 29 Aug 2024 02:29:55 +0200 Organization: A noiseless patient Spider Lines: 33 Message-ID: <vaofe4$3lv0c$1@dont-email.me> References: <uu54la$3su5b$6@dont-email.me> <v9m4gd$14scu$1@dont-email.me> <20240815182717.189@kylheku.com> <v9npls$1fjus$1@dont-email.me> <v9t204$2dofg$1@dont-email.me> <va28pi$3dldm$1@dont-email.me> <va2ro9$3gd7v$1@dont-email.me> <va2vt0$3h3gj$1@dont-email.me> <va44rh$3p1l6$1@dont-email.me> <va45eq$3pkt9$1@dont-email.me> <va4aut$3q4g0$1@dont-email.me> <va4fbr$3qvij$1@dont-email.me> <va5108$3tmmd$1@dont-email.me> <va51ok$3tqr9$1@dont-email.me> <va5ec2$3vluh$1@dont-email.me> <va6q4g$c1a7$1@dont-email.me> <va6rpa$c6bg$1@dont-email.me> <va6se9$cb8e$1@dont-email.me> <20240826083330.00004760@gmail.com> <vaises$2k7o6$2@dont-email.me> <20240826155113.000005ba@gmail.com> <wwvo75eicla.fsf@LkoBDZeT.terraraq.uk> <vak9k9$2ujrs$1@dont-email.me> <valgpu$34s18$1@dont-email.me> <vannkg$3ig72$1@dont-email.me> <vanrd8$3j0vv$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Date: Thu, 29 Aug 2024 02:29:56 +0200 (CEST) Injection-Info: dont-email.me; posting-host="7810b7c573e9956a796a0926308fb5e6"; logging-data="3865612"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+9bsUWFpVarChCqK2ILytE" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cancel-Lock: sha1:Zgqe3EZMU85w8TN86DOV+rCyhNI= X-Enigmail-Draft-Status: N1110 In-Reply-To: <vanrd8$3j0vv$1@dont-email.me> Bytes: 3609 [ NG list changed: removed shell, added editors; Fup-to set: editors ] On 28.08.2024 20:48, David Brown wrote: > On 28/08/2024 19:43, Muttley@dastardlyhq.com wrote: >> On Tue, 27 Aug 2024 21:34:54 -0000 (UTC) >> Lawrence D'Oliveiro <ldo@nz.invalid> wrote: >>> >>> In Emacs, I have commands defined to adjust the indentation of the >>> selected region. Surely any other decent editor would offer the same. >> >> Writing editor editor macros in order to work around fundamentally bad >> language design is not something a programmer should have to waste >> time on. > > I don't know about Emacs, but in most editors the way you indent a block > of code is to select the lines, then press "Tab". Unindenting is > "shift-Tab". [...] I also don't know about Emacs. But there's the question how "selected region" [LD'O] or "select the lines" [DB] is achieved. 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. Janis