1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-17 11:41:44 +00:00

Merge pull request #649 from asmsuechan/add-copy-on-ctrl-c-on-vim

Make Ctrl-C copy
This commit is contained in:
Kazu Yokomizo
2017-06-18 14:31:35 +09:00
committed by GitHub

View File

@@ -84,7 +84,13 @@ export default class CodeEditor extends React.Component {
'Cmd-T': function (cm) { 'Cmd-T': function (cm) {
// Do nothing // Do nothing
}, },
Enter: 'newlineAndIndentContinueMarkdownList' Enter: 'newlineAndIndentContinueMarkdownList',
'Ctrl-C': (cm) => {
if (cm.getOption('keyMap').substr(0, 3) === 'vim') {
document.execCommand('copy')
}
return CodeMirror.Pass
}
} }
}) })