![]() |
Editing code view in Sigil
The editing of an html file in the code view mode is hampered by Sigil trying to be clever. If I try to change all instances of an html tag ("<blockquote>", for example, Sigil will do a Find/Replace on the opening tag no problem. But when I try to edit the remaining closing tag ("</blockquote"> for example, I can't do it. Sigil refuses to do anything because now the opening & closing tags don't match any more.
The only way I can complete the "Find & Replace" is to copy the entire file and move it to Notepad, and then copy the file back to Sigil. This seems much too clumsy for a smart application like Sigil. Is there anyway to do large edits without confounding Sigil like this? |
What version are you running? This works ok for me, but of course I'm using the new beta at the moment.
But you can also do this using Regex, for example change all blockquote (with or without classes) to a simple paragraph then this should work: Code:
Find: (?sU)<blockquote(.*)>(.*)</blockquote> |
Switch Tidy off, that might do it for you.
However, it is better to use RegEx and do the replace in pairs. Unexpected things can and will happen if you let Tidy fix the HTML for you again. |
Yeah, of course, Tidy. I turn that off immediately these days - make sure you do the same in the beta - although switching to Edit->Clean Source->Pretty Print (and restarting) is my preferred setting now.
|
To replace all of a certain tag:
find: <(/)?blockquote> replace: <\1newtag> But yeah, disabling tidy is generally a good plan if you wish to hold on to some sanity (at least in the current release) |
Meme
I have a program (Agent Newsreader) that allows the user the option to Save and always use the same layout at startup, regardless of the last used configuration. It would be kool to also save toggle settings like Tidy, Search showing, Validation results showing 1) (factory) default. (also a command line switch to call this to recover from error/HW configuration changes) 2) Last used (saves state when closing) 3) Saved (snapshot) of windows and button states |
Quote:
|
find :<(/)?blockquote([^>]*?)>
replace: <\1newtag\2> |
Thanks
Quote:
|
| All times are GMT -4. The time now is 10:08 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.