marshallward / vim-restructuredtext

Syntax file for reStructuredText on Vim.
26 stars 12 forks source link

Indent: Preserve indentation of directives #64

Closed marshallward closed 3 years ago

marshallward commented 3 years ago

This patch preserves indentation in comments. It work by removing the explicit 3-space indentation and replaces with with an expression which uses the current value with a minimum of three spaces.

Discussed in the mailing list:

https://groups.google.com/g/vim_dev/c/rn8ZLDrCbYU

Thanks to Friedrich Romstedt for reporting and Christian Brabandt for investigating the issue.

marshallward commented 3 years ago

It seems the original request was to always honor the indentation of the previous line, and completely eliminate the 3-indentation cap within comments.

Although few people are monitoring this repo, it would be good to hear feedback from other before implementing somehing like that.

My initial impression is that we should keep this PR as it is, but also introduce a means to optionally disable comment indentation rules.

marshallward commented 3 years ago

I haven't seen any huge objections here and it feels like the correct behavior - even if it was not the original intention of the submitter - so I will merge this one. Additional issues can be handled as they arise.