Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve setting option values, and add user events #9

Closed
wants to merge 1 commit into from

Conversation

mildred
Copy link

@mildred mildred commented Jul 29, 2022

Add user events to allow the user to customize the indentation after the
detection, to fix some options that might be inherited from the initial
configuration. Allows to customize via the configuration which options
are set.

When tabs are detected, set shiftwidth=0 to ensure that the shifting
value is the same as the tabstop. Same with softtabstop=0 to disable it.
When spaces are detected, make optional setting of the tabstop and
softtabstop option.

Use case: In my init.vim I set default indent options for empty files:

set sw=2 sts=0 ts=8 et

When guess-indent detects a file with tabs, it needs to be able to override these values.

Also, I prefer to always keep a tabstop of 8 characters, so I prefer not to have the value changed. And I also prefer to keep the softtabstop option disabled, but if it is enabled when spaces are detected, it needs to be disabled wen tabs are detected.

Add user events to allow the user to customize the indentation after the
detection, to fix some options that might be inherited from the initial
configuration. Allows to customize via the configuration which options
are set.

When tabs are detected, set shiftwidth=0 to ensure that the shifting
value is the same as the tabstop. Same with softtabstop=0 to disable it.
When spaces are detected, make optional setting of the tabstop and
softtabstop option.
@mildred mildred marked this pull request as draft July 30, 2022 08:54
@mildred mildred marked this pull request as ready for review July 30, 2022 09:21
@NMAC427
Copy link
Owner

NMAC427 commented Jul 6, 2024

Should have been adressed by #17.

@NMAC427 NMAC427 closed this Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants