Skip to content

Conversation

@burneyy
Copy link
Contributor

@burneyy burneyy commented Dec 20, 2019

Check with burneyy#1 for detailed information on filetype detection changes

Daniel and others added 6 commits August 7, 2017 18:17
1. Drop `syntax=` declaration in favor of just setting `filetype=`. If filetype is set properly, also setting syntax shouldn't be necessary. Even if it was, the extra command `| set` isn't necessary, you can set more than one variable from a single set.

2. Use augroup. _Always_ place automd's inside an augroup, otherwise reloading plugins on a config change is problematic.

3. Simplify to a single autocmd.

4. Use `setlocal` so we don't disturb other buffers, especially ones where users may have overridden this detection.

5. Drop `*.rules`, this match conflicts with several other potential filetypes. If this is a common thing to use with snakemake you'll want to do some content inspection and make sure it's actually what you think it is, not for example a CSV import rules spec file.
Cleanup filetype detection commands
@alerque
Copy link
Collaborator

alerque commented Dec 22, 2019

Hey @ibab, it would be great to see this merged to your repository as it's the one everybody has forked from. I ran across this while maintaining NERD Commenter and looking for the best place to point snakemake users to get the filetype set so commenting worked properly. I ended up linking to @burneyy's fork because it had more robust rules and this repository doesn't even set the ft properly. Hence my submission of some tweaks to his fork instead of directly to here.

Additionally there are 2 other forks which both fix the some problem with ft as well as tweak a few other things. As soon as this is merged I'd be happy to help with PR's that normalize the features other forks have in common and add merge the additional bits they have here as well, but it will be a lot simpler to do after this gets merged.

CC: @ccwang002, @DHI-GRAS, and @karel-brinda who have done work on this as well.

karel-brinda added a commit to karel-brinda/vim-snakemake that referenced this pull request Dec 22, 2019
@ibab ibab merged commit eb4c231 into ibab:master Mar 1, 2020
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.

3 participants