Sublime Forum

Modifying Comment start/end symbol

#1

Hello,

I am trying to customize Sublime Text so that I can use {curly brackets} to indicate comments, rather than when writing in Markdown. I reviewed the unofficial documentation and tried a sublime-settings file to modify TM_COMMENT_START and END, but I get an error message. I’ve copied the example code exactly, except for changing the scope to Markdown, so perhaps that’s where the problem lies. Note that I have tried several items for the actual comment start, including “{”, “/u007B”, "# " (per the example script) and I always get the same error message, so I don’t think that’s the problem.

Any help would be appreciated. I am not a programmer, so I may be making some elemental mistake here the documentation doesn’t bother to address.

This is the error message:
Error trying to parse settings: Expected value in Packages/User/Markdown.sublime-settings:1:1

And this is my code (saved as Markdown.sublime-settings in the User folder)

<?xml version="1.0" encoding="UTF-8"?> name Curly_Comments scope source.Markdown settings shellVariables name TM_COMMENT_START value \u007B name TM_COMMENT_END value \u007D
0 Likes

#2

not sure if you hit https://github.com/guillermooo/sublime-undocs/issues/226 but this may help:
https://stackoverflow.com/a/44582720/4473405

1 Like

#3

It appears you tried to name the file with the sublime-settings extension. It has to be tmPreferences. You also need to be wary of the scope selector, as you have source.Markdown there, which won’t match. Use text.html.markdown instead.

0 Likes