[vim/vim] Cannot turn off autoindent/smartindent on xml or ant filetypes (Issue #14693)

94 views
Skip to first unread message

Byron Hawkins

unread,
May 1, 2024, 8:56:05 AM5/1/24
to vim/vim, Subscribed

Steps to reproduce

In a buffer with filetype set to "ant" or "xml";

:set noautoindent
:set nosmartindent

Now type something with an open brace ('{'), and vim indents the line. Closing the braced expression does not cause vim to un-indent the line. Typing tags, both open and closed, causes strange indentation that is incoherent with the xml structcure.

Expected behaviour

No lines should ever be indented by vim while I am typing in the buffer.

Version of Vim

VIM - Vi IMproved 9.0 (2022 Jun 28, compilé Nov 16 2023 00:00:00) Rustines incluses : 1-2105

Environment

Fedora 38 on a plain gnome terminal.

Logs and stack traces

No response


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14693@github.com>

bfrg

unread,
May 1, 2024, 10:04:36 AM5/1/24
to vim/vim, Subscribed

That's because for xml files, indentexpr is set, see indent/xml.vim. And ant filetypes load the xml indent script.

You need to set indendexpr= (i.e. to an empty string) in ~/.vim/after/ftplugin/xml.vim.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14693/2088511477@github.com>

Christian Brabandt

unread,
May 1, 2024, 12:01:31 PM5/1/24
to vim/vim, Subscribed

or remove indent from filetype plugin indent on


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14693/2088680804@github.com>

Christian Brabandt

unread,
May 1, 2024, 12:01:47 PM5/1/24
to vim/vim, Subscribed

Closed #14693 as not planned.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/14693/issue_event/12672104106@github.com>

Christian Brabandt

unread,
May 1, 2024, 12:01:51 PM5/1/24
to vim/vim, Subscribed

not a bug, so closing


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14693/2088681198@github.com>

Reply all
Reply to author
Forward
0 new messages