Skip to content

Commit

Permalink
Enable commenting/uncommenting with Ctrl-/ and Cmd-/
Browse files Browse the repository at this point in the history
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
  • Loading branch information
jimtng committed Feb 7, 2024
1 parent 362d9f3 commit 0a98c9f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ import 'codemirror/theme/gruvbox-dark.css'
import 'codemirror/addon/edit/matchbrackets.js'
import 'codemirror/addon/edit/closebrackets.js'
import 'codemirror/addon/comment/comment.js'
// for autocomplete
import 'codemirror/addon/hint/show-hint.js'
import 'codemirror/addon/hint/show-hint.css'
Expand Down Expand Up @@ -317,6 +319,8 @@ export default {
}
}
extraKeys['Shift-Tab'] = 'indentLess'
extraKeys['Cmd-/'] = 'toggleComment'
extraKeys['Ctrl-/'] = 'toggleComment'
cm.setOption('extraKeys', extraKeys)
cm.addOverlay(indentGuidesOverlay)
cm.refresh()
Expand Down

0 comments on commit 0a98c9f

Please sign in to comment.