![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: May 2017
Device: kindle
|
Collapse and expand code in Sigil
Hi Everyone
How to Collapse and expand code in Sigil ![]() |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,912
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
![]() |
![]() |
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
You cannot collapse the code. As this is the book itself, it wouldn't be very useful...
|
![]() |
![]() |
![]() |
#4 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,487
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Also, you can run PrettPrint and it will indent the xhtml to make it easier to see the structure. You can also use Preview and its Web Inspector to get a collapsable tree of exactly how the internal Webkit widget DOM tree was built.
|
![]() |
![]() |
![]() |
#5 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 697
Karma: 150000
Join Date: Feb 2010
Device: none
|
I'm guessing the OP means to be able to collapse blocks of code, in code view, to a single line (in the code view display, not the file itself) like you can do in, for example, the bluefish editor.
Just my $0.02 Albert |
![]() |
![]() |
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,362
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
If that's the case, then simply edit your html with an editor capable of collapsing blocks of code using the "Open With" feature of Sigil.
Sigil is not a full-featured html editor. The "Open With" feature allows users to edit their epub's html (or images, or css) with the editor of their choice. |
![]() |
![]() |
![]() |
#7 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,633
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
I would welcome it when trying to determine why paragraph 16 doesn't look the same style-wise as paragraph 6. If I break out into another editor I lose Preview (I would not expect that to collapse and expand) and the customised Sigil specific features - like clips. Those things matter far less when using an external to to edit images, audio etc. BR |
|
![]() |
![]() |
![]() |
#8 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,487
Karma: 5703586
Join Date: Nov 2009
Device: many
|
That is what The inspector widget it for in Preview. Give it a try, it tells you what css is active, can collapse and uncollapse the tree, etc. It has many useful features but most people don't play around enough with it to see all that can be done with it.
Quote:
|
|
![]() |
![]() |
![]() |
#9 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,633
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
On the odd occasions I need it I prefer break out into an editor I know, such as Notepad++, Bowpad, or TabEdit Pro, do what I need to do there and return to Sigil ASAP. BR |
|
![]() |
![]() |
![]() |
#10 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,487
Karma: 5703586
Join Date: Nov 2009
Device: many
|
No you can not edit inside the Inspector, but I thought your "use case" for it was to be able to more easily track down which css was active for which element. The Inspector can easily do that and you can edit in the CodeView window at the same time.
I simply can not see a strong case for a tree like collapsable structure for editing xhtml any more than I can see it used for writing structured programming languages. Indentation and whitespace does more to help in that regard than any editor feature. That is why we enabled the PrettyPrint option to indent code to allow the structure to be more easily seen. I will think about it as a long term option but I think the combination of "PrettyPrint", the "Inspector", and "Open With" makes this a very very low priority need. Quote:
Last edited by KevinH; 07-06-2017 at 11:24 AM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil metadata code questions | authorava | Sigil | 2 | 01-24-2017 03:21 PM |
Can I use the code Sigil uses for Covers for other images? | rosshalde | Sigil | 4 | 12-23-2014 11:00 AM |
Sigil code hints | kakkalla | Sigil | 12 | 05-13-2013 03:31 PM |
Calibre /author: collapse and expand Trees? | Raimund Parker | Calibre | 4 | 12-12-2012 06:53 PM |
Are the SGC_# a sigil code? | JaneFancher | Sigil | 14 | 09-06-2010 04:08 AM |