In Sublime Text 3, how can I change the comment character?

前端 未结 1 912
傲寒
傲寒 2021-01-03 07:42

I like the auto-comment feature Ctrl + /, but I\'d like to be able the change the character it uses arbitrarily. I have read many similar questions like this on

相关标签:
1条回答
  • 2021-01-03 08:15

    As mentioned in Enable automatic commenting in Sublime Text for a custom syntax, .tmPreferences files are used to specify what the comment markers are for a syntax.

    To edit the comment markers for R:

    1. Install PackageResourceViewer
    2. Open the command palette
    3. Type PRV: O
    4. Select PackageResourceViewer: Open Resource
    5. Select R
    6. Select Comments.tmPreferences
    7. Edit the TM_COMMENT_START value to #' as desired
    8. Save the file
    9. Use the toggle comment functionality on an R file and see that it now uses #' instead of #
    0 讨论(0)
提交回复
热议问题