Re: SOLVED+new Q: Re: How to re-indent text according to type...

2020-10-13 Thread L A Walsh
On 2020/10/12 23:34, Gary Johnson wrote: Anyone seen such fun? And thanks again gary, for the '=', don't recall ever seeing that. You're welcome. I am no expert in XML, but I thought that closing tags began with a slash, not a backslash; that is, with " Some days,

Re: SOLVED+new Q: How to re-indent text according to type...

2020-10-13 Thread Christian Brabandt
On Mo, 12 Okt 2020, Gary Johnson wrote: > You're welcome. > > I am no expert in XML, but I thought that closing tags began with > a slash, not a backslash; that is, with " Vim's XML indent plugin thinks so, too. > > I copied your example to another buffer, set its filetype to "xml", >

Re: SOLVED+new Q: Re: How to re-indent text according to type...

2020-10-13 Thread Gary Johnson
On 2020-10-12, L A Walsh wrote: > On 2020/10/10 23:10, Gary Johnson wrote: > >On 2020-10-10, L A Walsh wrote: > >>:%s/>/>^M/g > >>:%s/<\([^>]\+\)>\n\([^>]\+\)<\/\1>/<\1>\2<\\\1> > > > >I don't know of a way to do that with one command, > >then execute the following > >normal-mode command. > >

SOLVED+new Q: Re: How to re-indent text according to type...

2020-10-13 Thread L A Walsh
On 2020/10/10 23:10, Gary Johnson wrote: On 2020-10-10, L A Walsh wrote: :%s/>/>^M/g :%s/<\([^>]\+\)>\n\([^>]\+\)<\/\1>/<\1>\2<\\\1> I don't know of a way to do that with one command, then execute the following normal-mode command. gg=G --- close enough, as I gave 'ggap'

Re: How to re-indent text according to type

2020-10-11 Thread Gary Johnson
On 2020-10-10, L A Walsh wrote: > Sometimes, I get some unformatted text, like HTML or XML that has all > the newlines removed. > > To make it easier to read, I'll sometimes add newlines and pair > up adjacent tags, using something like: > > :%s/>/>^M/g >

How to re-indent text according to type

2020-10-10 Thread L A Walsh
Sometimes, I get some unformatted text, like HTML or XML that has all the newlines removed. To make it easier to read, I'll sometimes add newlines and pair up adjacent tags, using something like: :%s/>/>^M/g :%s/<\([^>]\+\)>\n\([^>]\+\)<\/\1>/<\1>\2<\\\1> But then I have an unindented file