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

Commentstring and comments strangely set for .rules files #15

Open
marcvs opened this issue Oct 6, 2018 · 1 comment
Open

Commentstring and comments strangely set for .rules files #15

marcvs opened this issue Oct 6, 2018 · 1 comment

Comments

@marcvs
Copy link

marcvs commented Oct 6, 2018

Not sure if this bug stems from elsewhere.

To reproduce:
check the output of ":set comments" and ":set commentstring".

For me it was
comments=:#
commentstring=c# %s

Leading to nerdcommenter not commenting stuff correctly.

This patch fixed it for me:

` diff --git a/syntax/openhab.vim b/syntax/openhab.vim
index 20bd5c8..0d87328 100644
--- a/syntax/openhab.vim
+++ b/syntax/openhab.vim
@@ -137,6 +137,8 @@ if &filetype=='openhab-rules'
hi def link openhabOption Macro
hi def link openhabOption_quote Label
hi def link openhabParameter Operator

  • set commentstring /%s/
  • set comments="s1:/,mb:,ex:/,://,b:#,:%,:XCOMM,n:>,fb:-,:#,:+ ,: ,:o ,:-"
    endif

" .persist File
`

@mueller-ma
Copy link
Collaborator

You can edit your first comment, mark the patch and click on Insert quote. This way Github formatting won't be applied to your patch.

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

No branches or pull requests

2 participants