![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,208
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
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. |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,010
Karma: 60358908
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
|
![]() |
![]() |
![]() |
#3 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,208
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
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:
|
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,307
Karma: 27111242
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?
|
![]() |
![]() |
![]() |
#5 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,010
Karma: 60358908
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 ![]() |
![]() |
![]() |
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,208
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
|
![]() |
![]() |
![]() |
#7 |
Enthusiast
![]() Posts: 47
Karma: 10
Join Date: Aug 2018
Location: Paris (France)
Device: Kobo Kindle Vivlio-Inkpad3
|
|
![]() |
![]() |
![]() |
#8 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,307
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
OK should be doable, opena bug report so I dont forget.
|
![]() |
![]() |
![]() |
#9 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,208
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
|
![]() |
![]() |
![]() |
#10 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,657
Karma: 145864619
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.
|
![]() |
![]() |
![]() |
#11 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,208
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Quote:
Assigning an overcomplicated shortcut accomplishes nothing. |
|
![]() |
![]() |
![]() |
#12 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,700
Karma: 29711016
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 06:15 PM. |
![]() |
![]() |
![]() |
#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". |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Alignement of blocks | Ghitulescu | Workshop | 18 | 09-04-2019 12:49 PM |
Css code to indent first paragraph? | shootist | Editor | 14 | 12-30-2015 06:17 AM |
conversion blocks the program | volopazzo | Conversion | 6 | 01-11-2015 08:54 AM |
Immutable code blocks | crutledge | Sigil | 1 | 05-10-2010 07:54 PM |
fonts as blocks in calibre | waxly | Calibre | 1 | 03-24-2010 10:42 PM |