Skip to content

Commit

Permalink
feat: add sublime keymap (vuejs#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
holazz committed Jun 14, 2023
1 parent db076eb commit 29263d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/codemirror/CodeMirror.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ onMounted(() => {
autoCloseBrackets: true,
autoCloseTags: true,
foldGutter: true,
gutters: ['CodeMirror-linenumbers', 'CodeMirror-foldgutter']
gutters: ['CodeMirror-linenumbers', 'CodeMirror-foldgutter'],
keyMap: "sublime",
}
const editor = CodeMirror(el.value!, {
Expand Down
3 changes: 3 additions & 0 deletions src/codemirror/codemirror.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ import 'codemirror/addon/fold/brace-fold.js'
import 'codemirror/addon/fold/indent-fold.js'
import 'codemirror/addon/fold/comment-fold.js'

// keymap
import 'codemirror/keymap/sublime.js'

export default CodeMirror

0 comments on commit 29263d8

Please sign in to comment.