Liste des Groupes | Revenir à l misc |
On 28/08/2024 19:43, Muttley@dastardlyhq.com wrote:The main problem isn't in changing the indentation of a block of code; it is in HAVING to do so because of poor language design. A lesser one is having to rely on whatever varied features that 100s of different editors may have to do so.On Tue, 27 Aug 2024 21:34:54 -0000 (UTC)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". Changing tabs to spaces or spaces to tabs is done by selecting "Tabs to spaces" from the Edit menu, or something equally simple and obvious. Many editor can be set to convert tabs to spaces (or vice versa) when saving files, perhaps specific to the file type (so you don't muck up your makefiles).
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:On Tue, 27 Aug 2024 11:26:18 +0100, Bart wrote:>
>(2) You want to temporarily comment out an 'if' line so that the>
following block is unconditional. You can't do that with also
unindenting the block.
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.
>
>
It takes a special kind of genius to be able to program, and yet still have trouble with this kind of thing.
Les messages affichés proviennent d'usenet.