08-07-2024, 09:29 AM | #1 |
Wizard
Posts: 1,076
Karma: 1221485
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Indent blocks of code
Hi, everyone.
Is there any way to indent blocks of code? I can use tab to increase the indent of a single element, but that seems to be it. It would be nice if the Editor could handle multiple elements, like PyCharm and other IDEs. In PyCharm, you can select multiple elements (e.g.: a bunch of <p>s) and hit tab, so they all move forward. You can also use shift+tab to move backwards. @Kovid, do you think is could be possible? Or maybe there are already shortcuts that I'm not aware of. |
08-07-2024, 10:19 AM | #2 |
Well trained by Cats
Posts: 30,442
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Beautify? (the flower icon) 1) on the current tab, applies to that Tab. 2) on the main menubar, all Text files
|
Advert | |
|
08-07-2024, 10:33 AM | #3 | |
Wizard
Posts: 1,076
Karma: 1221485
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Quote:
In that case, it would be really useful to be able to speed the process, working with blocks, instead of individual elements. * Here is an example where beautify doesn't work: Spoiler:
|
|
08-07-2024, 10:44 AM | #4 |
creator of calibre
Posts: 44,525
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
What exactly are you looking for? A shortcut to add one level of indent to all selected lines? Something dependent on tags?
|
08-07-2024, 10:45 AM | #5 |
Well trained by Cats
Posts: 30,442
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Yep! Which is why I use Both Calibre and Sigil editors. IMHO Sigil does the code Pretty better. Calibre Fixes code better.
Each has their strong points. (and, No! I don't want either to be made the same, you might fix what I already like) |
Advert | |
|
08-07-2024, 10:58 AM | #6 |
Wizard
Posts: 1,076
Karma: 1221485
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
|
08-07-2024, 11:10 AM | #7 |
Enthusiast
Posts: 46
Karma: 10
Join Date: Aug 2018
Location: Paris (France)
Device: Kobo Kindle Vivlio-Inkpad3
|
|
08-07-2024, 11:43 AM | #8 |
creator of calibre
Posts: 44,525
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
OK should be doable, opena bug report so I dont forget.
|
08-07-2024, 11:59 AM | #9 |
Wizard
Posts: 1,076
Karma: 1221485
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
|
08-07-2024, 12:07 PM | #10 |
Resident Curmudgeon
Posts: 76,368
Karma: 136006198
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Please make the keystroke for code indent be control-F5-Shift Z. Something we'd never use or hit by accident.
|
08-07-2024, 12:15 PM | #11 | |
Wizard
Posts: 1,076
Karma: 1221485
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Quote:
Assigning an overcomplicated shortcut accomplishes nothing. |
|
08-07-2024, 07:06 PM | #12 |
null operator (he/him)
Posts: 20,994
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Why would insert/remove indent not have a user configurable shortcut?
Unless it can be guaranteed they will not clash with any existing shortcuts (within the application in question, the OS, or a WitW program) new features should not have any default shortcuts… IMO. BR Last edited by BetterRed; 08-07-2024 at 07:15 PM. |
08-09-2024, 11:36 AM | #13 | |
Perfectionist
Posts: 72
Karma: 12802
Join Date: Apr 2014
Device: none
|
Quote:
For instance, "Indent all <p> tags" or even more granular "Indent all <p class="INSERTCLASS"> tags". |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Alignement of blocks | Ghitulescu | Workshop | 18 | 09-04-2019 01:49 PM |
Css code to indent first paragraph? | shootist | Editor | 14 | 12-30-2015 07:17 AM |
conversion blocks the program | volopazzo | Conversion | 6 | 01-11-2015 09:54 AM |
Immutable code blocks | crutledge | Sigil | 1 | 05-10-2010 08:54 PM |
fonts as blocks in calibre | waxly | Calibre | 1 | 03-24-2010 11:42 PM |