mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-22 00:06:06 +08:00
fix(keymaps): create user keymaps file in .nylas/ if non existent
This commit is contained in:
parent
e87b5700e2
commit
9801529aa1
|
@ -97,6 +97,9 @@ class PreferencesKeymaps extends React.Component
|
||||||
return keystrokes.replace(/-/gi,'').replace(/cmd/gi, '⌘').replace(/alt/gi, '⌥').replace(/shift/gi, '⇧').replace(/ctrl/gi, '^').toUpperCase()
|
return keystrokes.replace(/-/gi,'').replace(/cmd/gi, '⌘').replace(/alt/gi, '⌥').replace(/shift/gi, '⇧').replace(/ctrl/gi, '^').toUpperCase()
|
||||||
|
|
||||||
_onShowUserKeymaps: =>
|
_onShowUserKeymaps: =>
|
||||||
require('shell').showItemInFolder(atom.keymaps.getUserKeymapPath())
|
keymapsFile = atom.keymaps.getUserKeymapPath()
|
||||||
|
if !fs.existsSync(keymapsFile)
|
||||||
|
fs.writeSync(fs.openSync(keymapsFile, 'w'), '')
|
||||||
|
require('shell').showItemInFolder(keymapsFile)
|
||||||
|
|
||||||
module.exports = PreferencesKeymaps
|
module.exports = PreferencesKeymaps
|
||||||
|
|
Loading…
Reference in a new issue