toggleComment / lineComment does not work for YAML


#1

Hey,
I’m using these options:

autoFocus: true,
lineNumbers: true,
gutters: [‘CodeMirror-lint-markers’],
lint: true,
indentWithTabs: false,
tabMode: ‘indent’,
mode: ‘yaml’,
extraKeys: {
‘Cmd-/’: editor => {
editor.toggleComment({ commentBlankLines: true, fullLines: true });
}
}
The function is being called when pressing Cmd-/, but for some reason, the toggle command is not being executed, and the code is not being commented…

Any suggestions or ideas for what I’m doing wrong?


#2

Please don’t post the same thing to the issue tracker and the forum. I get enough email as it is.

(See https://github.com/codemirror/CodeMirror/issues/5248)


#3

I’m so sorry, I thought these are being run by different people