Bug#918672: [vim] XML auto indentation misbehaves (adds/removes additonal/wrong indentation)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#918672: [vim] XML auto indentation misbehaves (adds/removes additonal/wrong indentation)

Andre Naujoks
Package: vim
Severity: normal

--- Please enter the report below this line. ---

Hello.

Since the last update to vim, the XML auto indentation seems to be
broken and is misbehaving.

This bug needs vim-nox, vim-athena or similar to appear. I.e. something
where automatic XML-indentation works out of the box.

Every time a tag is closed or return is pressed after a closing '>', vim
indents the line one more step without taking the actual indentation
into account.

This only affects non-root nodes. (so all nodes except the very outer node)

For example:

- create a file with an .xml extension (e.g. 'vi /tmp/tmp.xml'), so the
XML indentation is used.
- create a root node

<root>
</root>

- add another node

<root>
        <other>
</root>

- while entering the closing '>', the node is indented one additional step.
- when pressing return after the closing '>' the node is indented
another additional step.
- insert the closing tag in the new line. '</other>'
- after entering the closing tags '>' the tag is indented one step back.
(- pressing return/adding another line break after the closing tag again
removes another level of indentation)

The resulting buffer looks something like this:

<root>
                        <other>
                </other>
</root>


I would expect:
<root>
        <other>
        </other>
</root>

Regards
  Andre


--- System information. ---
Architecture: Kernel:       Linux 4.19.0-1-amd64

Debian Release: buster/sid
  500 unstable-debug  debug.mirrors.debian.org   500 unstable
deb.debian.org     1 experimental-debug deb.debian.org     1
experimental    deb.debian.org
--- Package information. ---
Package's Depends field is empty.

Package's Recommends field is empty.

Package's Suggests field is empty.

Reply | Threaded
Open this post in threaded view
|

Bug#918672: [vim] XML auto indentation misbehaves (adds/removes additonal/wrong indentation)

Christian Brabandt-2
Upstream maintainer here: I could not verify that this still happens
with the latest version of the xml indent script. Please verify using
the runtime files from https://github.com/chrisbra/vim-xml-ftplugin/

If that is fixed, I suppose the next upload to Debian will come with
updated runtime files (it's already fixed in Vims source distribution).

If not, please open a new issue at the upstream repository with clear
reproduction steps.

Thanks,
Christian
--
Hallo Kakteenz├╝chter!

Reply | Threaded
Open this post in threaded view
|

Bug#918672: same issue with bash scripts

Thibault Roulet
In reply to this post by Andre Naujoks

Hi,

Experiencing the same kind of problems with bash scripts.

Indentation is working fine under stretch but got some problems under buster. Should I open a new case ?

Thibault

Reply | Threaded
Open this post in threaded view
|

Bug#918672: same issue with bash scripts

James McCoy
On Tue, Sep 03, 2019 at 01:49:05PM +0200, Thibault Roulet wrote:
> Hi,
>
> Experiencing the same kind of problems with bash scripts.
>
> Indentation is working fine under stretch but got some problems under buster.
> Should I open a new case ?

It's unlikely to get fixed in Buster, but yes bash and XML are
completely different indent mechanisms so they should have separate
reports.

Cheers,
--
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7  2D23 DFE6 91AE 331B A3DB