Quote:
Originally Posted by meme
As theducks said, some folks scare easily of CV, or rather, most users starting with Sigil will use BV. And I'm not sure why you would prevent its use there since it doesn't cause any additional issues and works fine.
|
I really, really can't see why someone who understands regex would want to use it in BV, I simply do not understand how someone who understands regex would then be scared off by using it in the code view. I understand that regex is unfriendly and that people who might be scared off by code and such require a nice way to search - and that is why I think that BV should be limited to the simple searches only (You might notice that I also asked for the case sensitive options to be returned).
Consider doing a replacement in BV, what advantage do you have over doing it in CV?
I cant think of any outside of the unlikely or low-frequency 'matching in tag/attributes'.
Then let us take this to the other side, what do I gain by limiting regex to the code view?
I will not frustratingly have clicked into a view, and after counting BV, matched nothing and incorrectly assumed that something is correct.
BV matches do not preserve tags, the text matched, if used in replacement - will be stripped of formatting, in many cases this would be rather bad(think calibre's spammed spans).
One less (and imho most likely very seldomly well used) use case to provision for (see this very
bikeshed).
Quote:
Originally Posted by meme
Why is it best with regex not to use a cursor position? Maybe I'm just missing something.
|
Meh, the reasons are pretty minor, I guess its one of those things which I dislike since it's inefficient in both implementation and user interaction.
Most tools use a results cache, avoiding the whole cursor position issue, this also makes the whole model a lot easier to think about.
The next result, if you have moved the cursor in-front of a match, is the same result as the previous match.
If you swap document with the same cache, you are able to hop to the next result without needing to swap back to the document, figure out where the cursor was and then hopefully get the correct next match.
An alternative would be to have a results list: far more friendly, useful and informative than having to flip through new matches sequentially, without moving around.