Skip to content

Use 'setfiletype' to set local &filetype #473

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

Merged
merged 1 commit into from
Feb 13, 2019

Conversation

jparise
Copy link
Contributor

@jparise jparise commented Feb 13, 2019

'setfiletype' is nice in these cases because it prevents &filetype from
being set redundantly.

Note that the Vim runtime ships with a filetype match for *.ex (for
Euphoria), but our plugin-based filetype detection still gets the last
say.

Also, use 'setlocal' when setting &filetype in the shebang detection
path. We don't want to use 'setfiletype' here because it's possible we
need to override an existing syntax assignment, and we already guard
against setting &filetype to 'elixir' twice.

'setfiletype' is nice in these cases because it prevents &filetype from
being set redundantly.

Note that the Vim runtime ships with a filetype match for *.ex (for
Euphoria), but our plugin-based filetype detection still gets the last
say.

Also, use 'setlocal' when setting &filetype in the shebang detection
path. We don't want to use 'setfiletype' here because it's possible we
need to override an existing syntax assignment, and we already guard
against setting &filetype to 'elixir' twice.
@jbodah jbodah merged commit 653cc4d into elixir-editors:master Feb 13, 2019
jbodah added a commit that referenced this pull request Feb 14, 2019
jbodah added a commit that referenced this pull request Feb 14, 2019
kelvinst pushed a commit to kelvinst/vim-elixir that referenced this pull request Aug 21, 2019
'setfiletype' is nice in these cases because it prevents &filetype from
being set redundantly.

Note that the Vim runtime ships with a filetype match for *.ex (for
Euphoria), but our plugin-based filetype detection still gets the last
say.

Also, use 'setlocal' when setting &filetype in the shebang detection
path. We don't want to use 'setfiletype' here because it's possible we
need to override an existing syntax assignment, and we already guard
against setting &filetype to 'elixir' twice.
kelvinst pushed a commit to kelvinst/vim-elixir that referenced this pull request Aug 21, 2019
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