marshallward / vim-restructuredtext

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

Document style option #37

Closed averms closed 5 years ago

averms commented 5 years ago

I thought it would be good to document the g:rst_style option. Here is my attempt:

RESTRUCTURED TEXT                   *ft-rst-plugin*

By default the following options are set: >
    setlocal expandtab shiftwidth=3 softtabstop=3 tabstop=8

To disable this behavior, set the following variable in your vimrc: >
    let g:rst_style = 0

This should go in filetype.txt.

averms commented 5 years ago

If I read the CONTRIBUTING.md correctly I should send changes to you and then you will send them to Bram.

marshallward commented 5 years ago

That's probably the best way, most issues that aren't sent by the maintainer tend to get closed quickly.

I'd like to ask whether this should even be in the runtime though. There was an older discussion about what these settings ought to be, and has been in the repo for a while, but it's likely that they were only recently added to vim around the time of the RstFold support.

There's already been another comment about enforcing this. Maybe we should disable it for now, or remove it from ftplugin? Would be great to get feedback from anyone else watching this repo.

marshallward commented 5 years ago

Also, looks like it's modelled after the python_recommended_style docs, right? That seems good to me.

averms commented 5 years ago

Also, looks like it's modelled after the python_recommended_style docs, right?

Yup pretty much.

polyzen commented 5 years ago

Perhaps this, like folding, should be disabled by default. At least until the "more sophisticated indentation rules" are settled upon.

marshallward commented 5 years ago

Yeah, I'm inclined to agree. Will leave this up another week or so and make the change if there's no other arguments.

It would be good to revisit the settings at some point. I think it will take some thought and parsing of the spec, since it's never going to be as well-defined as something like PEP8.

marshallward commented 5 years ago

Thanks for the comments here, I've turned off rst_style and sent the update to Bram.