Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 11-01-2020, 10:30 AM   #31
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,447
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Thasaidon View Post
I apologise Hitch, I have just realised my N.B. comment might have been taken to be aimed at you.

It most Certainly Was NOT!

Unfortunately there are some forum members who I think, shall we say, are over forceful and sometimes verge on disrespectful in the way they put forward RFQ's to KevinH and Diap. It was people of this water I was addressing.
No, no, sweetie, I was agreeing with, and seconding, your comment. I didn't take it as directed at me at ALL. :-) We're good, bud.

n.b.: plus, since Kevin and Dap refuse to allow us to show our gratitude in a more fiscal way...I can't miss an opportunity to say THANKS.

Hitch
Hitch is offline   Reply With Quote
Old 11-02-2020, 02:35 AM   #32
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 800
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Quote:
Originally Posted by Hitch View Post
No, no, sweetie, I was agreeing with, and seconding, your comment. I didn't take it as directed at me at ALL. :-) We're good, bud.[/SIZE]

Hitch
Pheew! Thank you for that. I appreciate the good sense in your postings.

Memo to self for the millionth time Do not engage mouth/posting/IM/etc. until brain is in gear"
Thasaidon is offline   Reply With Quote
Advert
Old 11-02-2020, 09:40 AM   #33
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Kevin's looking into it, I believe. If there's no unforeseen major complications to the implementation of the feature, I'm sure it will be included in a future release. The presence of a highlighted closing tag that I (still) don't fully understand the need/desire for is unlikely to interfere with this curmudgeon's personal epub-editing feng shui.
DiapDealer is offline   Reply With Quote
Old 12-07-2020, 10:19 AM   #34
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
Hi All,

Okay we have now implemented a version of this in Sigil master. It will highlight both the open and proper closing tag if your cursor is anywhere inside the opening or closing tag.

But we need some input from people who make use of this feature.

Since an opening tag can have many attributes that can go across line boundaries, highlighting the open and closing pair anytime while inside the opening / closing tag seems to be a bit distracting to me.

It can cover the complete highlighted line and is visually noisy.

I can understand that highlighting the pair may help but I would like to limit the places the cursor can be to highlight the open/ close pair.

<tag attribute1 attribute2 ...>
blah blah blah blah
</tag>

Instead of doing the highlighting anytime the cursor is anyplace in the tag, I would much prefer limiting this extra highlighting to when the cursor is directly on a '<' or '>'.

So something like |<tag> or </tag|> where the | represents that cursor in the editor is when I would like to enable highlighting but any other location in the tag, no highlighting.

That way anybody who wants to see the highlighting can move the cursor to just the start of the tag or just to the end of any tag to see the tag open/close highlighting thus quickly enabling them to check for tag open/close pairs without having to deal with the flashing as much.

What to people think?
KevinH is online now   Reply With Quote
Old 12-07-2020, 12:11 PM   #35
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 664
Karma: 2180702
Join Date: Jan 2017
Location: Poland
Device: Kindle (Key3, PW2, PW3), Nook (ST, GLP), Kobo Touch, Tolino Vision 2
IMHO, the current proposal (build from master) is fine.

I use many code editors. Applications treat the code highlighting mechanism in a different way, and more or less allow users to configure this process.
Sometimes it is just highlighting the tag itself, and other times the whole – from beginning to end, i.e. in the case of the cursor in the <html> tag, practically the entire document is highlighted.

Your current solution (last commits) is balanced enough for me to get used to it.
At first I wasn't sure if such a function was needed in Sigil, but I liked it already!

I understand your suggestion that the highlighting of the tagged text should work to a limited extent, but I am a visual learner, so if I could see it, maybe I would also like an alternative solution.
Personally, it doesn't bother me that all these attributes are highlighted, because my eyesight instantly covers the appropriate piece of code, I can also scroll through the text and make sure everything is fine.

I miss:
* the option to disable it, because I believe that there will be users who would like not to use this feature in Code View.
* probably, however, you can choose your own color for this text highlight – currently it is the background color for line numbers. In the default (light) mode, this is a great choice, but in the dark mode, I would probably experiment with a different color. I would love to listen to other users.
BeckyEbook is offline   Reply With Quote
Advert
Old 12-07-2020, 12:36 PM   #36
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
What I am proposing is to only do the highlighting when the cursor is only in two specific positions in the tag, either right on the < or >.

There would be less unnecessary highlighting and it would allow the user to better control when it appears.

The highlight color is the same used to mark text and it will change depending on dark or light mode.

Adding a SettingsStore item to enable/disable this is possible but our Sigil prefs menus are all rather busy enough. I do not want settings for everything and it’s brother (ala calibre’s approach) as the sheer number of settings can itself get confusing.

So I will look into where this Prefs setting might be set in the Preferences Dialogs.
KevinH is online now   Reply With Quote
Old 12-07-2020, 12:45 PM   #37
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I'd be willing to tackle the gui side of any preference-related needs, if it will help.
DiapDealer is offline   Reply With Quote
Old 12-07-2020, 12:50 PM   #38
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 664
Karma: 2180702
Join Date: Jan 2017
Location: Poland
Device: Kindle (Key3, PW2, PW3), Nook (ST, GLP), Kobo Touch, Tolino Vision 2
There is a place in Preferences, even in the right place – in the "Code View" tab.
The width of the window is enforced by other widgets anyway, so this place just begs for additional "tweaks" for the code view.
Attached Thumbnails
Click image for larger version

Name:	highlight-matching-tag.png
Views:	119
Size:	33.0 KB
ID:	183843  
BeckyEbook is offline   Reply With Quote
Old 12-07-2020, 12:57 PM   #39
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
Each Preferences Window needs to fit on an 800x600 pixel Window leaving enough room on the bottom for the parent Preferences pieces and on the left for the Preference Selection area.

Yes, @DiapDealer please take a shot at adding a setting for it as I really hate to edit the .ui files since I do it by hand as I could never get QtDesigner/QtCreator to do what I want.

Last edited by KevinH; 12-07-2020 at 01:00 PM.
KevinH is online now   Reply With Quote
Old 12-07-2020, 01:51 PM   #40
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KevinH View Post
Okay we have now implemented a version of this in Sigil master. It will highlight both the open and proper closing tag if your cursor is anywhere inside the opening or closing tag.
I like the default behavior, because it exactly matches the behavior of Scintilla-based editors such as Notepad++.
I also have no problems with the default highlight color.



Quote:
Originally Posted by KevinH View Post
Instead of doing the highlighting anytime the cursor is anyplace in the tag, I would much prefer limiting this extra highlighting to when the cursor is directly on a '<' or '>'.
I honestly don't see any advantage in implementing this approach and would rather you keep the current implementation.

BTW, I have another idea: since the tag highlighting code must keep track of opening and closing tags, how about also adding a keyboard shortcut that'll delete both opening and closing tags, but keeps the text enclosed by the tags?
This would make it easy to get rid of superfluous <span> or <div> tags.
Doitsu is offline   Reply With Quote
Old 12-07-2020, 02:14 PM   #41
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
The reason I want to limit this behaviour is that the only true correct way to do this is, as you say, to parse the entire document on the fly with every cursor position change in the document. And you must start at the top of the entire file to properly handle multi-line comments and multi-line cdata and may need to often read and parse to at least whatever end tag exists.

If this would only be done when the cursor is a very specific position it eliminates tons of needless parsing and reparsing wastefulness but still lets the user highlight open and close tags by properly positioning his/her cursor over the '<' or '>' char of any tag.

This wasteful reparsing just by moving the cursor may not impact short or even normal length files but may be a big slowdown with long or huge files with lots and lots of tags especially when working in the last half of the huge file.

So I wanted the user to control when they truly want or need to see this instead of just letting it happening repeatedly when moving the cursor across a tag.

Last edited by KevinH; 12-07-2020 at 02:20 PM.
KevinH is online now   Reply With Quote
Old 12-07-2020, 02:16 PM   #42
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by Doitsu View Post
BTW, I have another idea: since the tag highlighting code must keep track of opening and closing tags, how about also adding a keyboard shortcut that'll delete both opening and closing tags, but keeps the text enclosed by the tags?
This would make it easy to get rid of superfluous <span> or <div> tags.
If this happens enough, wouldn't TagMechanic be a better solution than doing this again and again by hand?
KevinH is online now   Reply With Quote
Old 12-07-2020, 02:32 PM   #43
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
In fact, if the reparsing to get tag positions and matches does interfere when editing long files, we may have to change how we do this and store/cache the list of tags and positions and update it in the background in a separate thread triggered by the textChanged signal.

I really do not want to have to store and cache the parsing as that will lead to dealing with stale data at some point.
KevinH is online now   Reply With Quote
Old 12-07-2020, 04:33 PM   #44
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Yes, @DiapDealer please take a shot at adding a setting for it as I really hate to edit the .ui files since I do it by hand as I could never get QtDesigner/QtCreator to do what I want.
No problem. Will a simple boolean in the general SettingStore suffice? Default to true, I'd guess?
DiapDealer is offline   Reply With Quote
Old 12-07-2020, 05:17 PM   #45
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
Yes a simple boolean would work well. We can "and" its value with the highlight_tags boolean value test in CodeViewEditor::HighlightCurrentLine to control things.

Thanks!


Quote:
Originally Posted by DiapDealer View Post
No problem. Will a simple boolean in the general SettingStore suffice? Default to true, I'd guess?
KevinH is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Quick Question Moonbeam111 KOReader 9 08-28-2019 12:16 PM
Quick Question.. The Branimal Kobo Reader 3 04-25-2011 08:17 PM
Quick question... Magic Man Calibre 18 09-05-2010 03:18 PM
PRS-600 Okay, quick question.... emonti8384 Sony Reader 13 11-12-2009 06:18 PM
Quick Question. Baz047 Sony Reader 10 12-09-2008 12:25 PM


All times are GMT -4. The time now is 12:07 PM.


MobileRead.com is a privately owned, operated and funded community.