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,
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",
>
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.
> >
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'
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
>
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