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

Remove over-eager ftplugin indent settings #36

Merged
merged 2 commits into from
Aug 11, 2013
Merged

Remove over-eager ftplugin indent settings #36

merged 2 commits into from
Aug 11, 2013

Conversation

jacknagel
Copy link
Contributor

It's not really appropriate for filetype plugins to set indent-related options.

In this case, the appropriate options (autoindent, expandtab, and sw=2) are already being set in indent/slim.vim.

smartindent is meant for C-like languages where the normal C indentation doesn't work. There's no reason to use it here (autoindent is what you want, but that's already set in indent/slim.vim).

There's no reason to set all of tabstop, softtabstop, and shiftwidth; and when using smarttab, only shiftwidth is required.

However, smarttab is a global option with no buffer-local value, so setting it (even with setlocal) changes the option for all buffers. Thus it should be left up to the user.

Thus I propose just removing this file completely.

It's not really appropriate for filetype plugins to set indent-related options.

In this case, the appropriate options (autoindent, expandtab, and sw=2)
are already being set in indent/slim.vim.

smartindent is meant for C-like languages where the normal C indentation
doesn't work. There's no reason to use it here (autoindent is what you
want, but that's already set in indent/slim.vim).

There's no reason to set all of tabstop, softtabstop, and shiftwidth;
and when using smarttab, only shiftwidth is required.

However, smarttab is a global option with no buffer-local value, so
setting it (even with setlocal) changes the option for all buffers. Thus
it should be left up to the user.
@jacknagel
Copy link
Contributor Author

I also removed the same settings from ftdetect/slim.vim, as again, they are already being set in indent/slim.vim, and an ftdetect file should not change settings.

This is the standard way to set the filetype, and allows syntax.vim to
set the correct syntax highlighting automatically.
stonean pushed a commit that referenced this pull request Aug 11, 2013
Remove over-eager ftplugin indent settings
@stonean stonean merged commit ee8f2a5 into slim-template:master Aug 11, 2013
@stonean
Copy link
Contributor

stonean commented Aug 11, 2013

Thank you for the contributions!

@jacknagel
Copy link
Contributor Author

Awesome, thanks for the speedy merge!

@benlovell
Copy link

Same issue here. File detection is broke.

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.

5 participants