Skip to content

Added entry for using standalone syntax with vimwiki #341

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 3 commits into from
Jul 29, 2020
Merged

Added entry for using standalone syntax with vimwiki #341

merged 3 commits into from
Jul 29, 2020

Conversation

paniash
Copy link
Contributor

@paniash paniash commented Jul 28, 2020

No description provided.

Co-authored-by: Caleb Maclennan <caleb@alerque.com>
@paniash
Copy link
Contributor Author

paniash commented Jul 29, 2020

Apologies for that. I have made the changes that you suggested. Thanks!

@alerque
Copy link
Member

alerque commented Jul 29, 2020

Thanks for the contribution!

@alerque alerque merged commit 6fb2021 into vim-pandoc:master Jul 29, 2020
@paniash
Copy link
Contributor Author

paniash commented Jul 29, 2020

Just out of curiosity, what's the difference between the original code that I wrote and your suggestion. The original works fine on my setup so was just wondering. Thanks!

@alerque
Copy link
Member

alerque commented Jul 29, 2020

@paniash Besides just being a VIM rule, the reason for the rule is so that other plugins don't mess up your intended behavior. In the case of your initial version for example another plugin could come along and add their own hook to the FileType and blow yours away. It wouldn't even have to be a syntax plugin, it could be anything, but it would nuke your rule and it would appear like this plugin just suddenly stopped working. It wouldn't be our fault and it might even happen when a user updated plugins so they would assume we did something to break it — but the culprit would be the lack of a group namespace on their autocommand hook that allowed it to get blown away by something unrelated.

Another issue (and the reason I added the ! modifier on you) is so that reloading your config file doesn't cause the hook to be setup twice, which can also create weird unwanted behavior.

@paniash
Copy link
Contributor Author

paniash commented Jul 29, 2020

Thank you very much for the detailed answer :) @alerque.

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