Skip to content

Commit a508523

Browse files
dtom90Rokt33r
authored andcommitted
Loading insert day hotkey triggers from config.hotkey
1 parent db396ec commit a508523

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

browser/components/CodeEditor.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -205,23 +205,11 @@ export default class CodeEditor extends React.Component {
205205
'Cmd-T': function (cm) {
206206
// Do nothing
207207
},
208-
'Ctrl-/': function (cm) {
209-
if (global.process.platform === 'darwin') { return }
208+
[translateHotkey(hotkey.insertDate)]: function (cm) {
210209
const dateNow = new Date()
211210
cm.replaceSelection(dateNow.toLocaleDateString())
212211
},
213-
'Cmd-/': function (cm) {
214-
if (global.process.platform !== 'darwin') { return }
215-
const dateNow = new Date()
216-
cm.replaceSelection(dateNow.toLocaleDateString())
217-
},
218-
'Shift-Ctrl-/': function (cm) {
219-
if (global.process.platform === 'darwin') { return }
220-
const dateNow = new Date()
221-
cm.replaceSelection(dateNow.toLocaleString())
222-
},
223-
'Alt-Cmd-/': function (cm) {
224-
if (global.process.platform !== 'darwin') { return }
212+
[translateHotkey(hotkey.insertDateTime)]: function (cm) {
225213
const dateNow = new Date()
226214
cm.replaceSelection(dateNow.toLocaleString())
227215
},

0 commit comments

Comments
 (0)