How to change comment line/block syntax?


#1

I want to be able to change cmd-/ syntax for Applescript from
… /* code */
to
– each line in selected block

I’ve tried to change the language-applescript grammar files but my atom/coffeescript skills not that hot so got in a mess.

Any help would be appreciated.


#2

I assume you’re using this package to get the applescript grammar. In the package configuration I didn’t see any option for the comment chars, and I’m not really any good with grammars.

I guess there are two things you could do:

  • fork the repository, add the option in the package configuration for the comment character to be used and fire a merge request
  • include in your keymap file a selector for the applescript language (something like "atom-text-editor[data-grammar='source applescript']") and bind it to a custom command in your init.cson file so that the selected text is commented as you like

Sorry I can’t get any deeper in the issue, hope this helps anyway.