| Deutsch English Français Italiano |
|
<v70346$2mu9$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.nobody.at!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com> Newsgroups: comp.editors Subject: Re: Please ignore my previous post - Re: Automating an atypical search & replace Date: Sun, 14 Jul 2024 10:43:48 +0200 Organization: A noiseless patient Spider Lines: 62 Message-ID: <v70346$2mu9$1@dont-email.me> References: <v6u8qi$3lh0j$1@dont-email.me> <v6uem9$3mj8r$1@dont-email.me> <v6uf2o$3mlhi$1@dont-email.me> <v6vv07$220l$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Date: Sun, 14 Jul 2024 10:43:50 +0200 (CEST) Injection-Info: dont-email.me; posting-host="cfcc978f7e3a8e220401f4e021743ee9"; logging-data="89033"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18zb0PsIGm6u08sWIpTEYjQ" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cancel-Lock: sha1:vNG45uCvDKBMlJh/rz1lG2GPTQA= In-Reply-To: <v6vv07$220l$1@dont-email.me> X-Enigmail-Draft-Status: N1110 Bytes: 3611 On 14.07.2024 09:33, Richard Owlett wrote: > On 07/13/2024 12:55 PM, Janis Papanagnou wrote: >> Please ignore my previous post - it would delete the whole span'ed >> section! >> >> >> It just occurred to me you'd probably want something like >> >> /<span class='add'> >> df> >> /<\/span> >> df> >> >> And if you're using recording of the commands (I'll provide code >> on demand) just repeat the recordings. You can also just use the >> arrow keys after typing / to get the previous search patterns >> if you like. > > I don't know how to parse your answer. What I meant is that if you're doing some editing tasks or editing commands repeatedly you certainly want to avoid typing them over and aver again. There's a couple methods to achieve that in the Vim editor. One method is using the editor's history functions that make it possible to access (for example) previous search patterns. Another one in Vim is to record the commands to be able to replay them whenever you want with simple keystrokes. The maybe cryptic appearing commands I gave are the Vim commands for the task you had described: / searches for the regular expression pattern following df> deletes the text up to the tag-terminating '>' symbol > But I suspect following some leads from Lawrence and Stan in this thread > will be illuminating. I have just started reading > https://docs.kde.org/stable5/en/kate/katepart/regular-expressions.html . > > Part of my motive for this project is self education. Fair enough. It's not clear to me what exactly you want to learn. Using the Kate editor, learning how to write Regular Expressions, how to efficiently edit texts, or how to handle/edit HTML files to make them readable for your purposes? If it's the latter than the right way to do that is (as already said in my [OT] reply or as also Stan suggested) to just fix the CSS definition, if that's the place where the 'italic' property had been defined. (If, OTOH, your HTML code contains, e.g. lots of <i> tags then you'd have to handle/edit them individually.) It has also been mentioned already that HTML structures can not sensibly handled by regular expressions. - So you learned that already. - But for non-nested HTML sub-structures it could be achievable anyway. To learn the Kate editor I'd suppose there's a description or manual available. Janis