mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-08 01:04:39 +08:00
fix(keymaps): create user keymaps file in .nylas/ if non existent
This commit is contained in:
parent
e87b5700e2
commit
9801529aa1
1 changed files with 4 additions and 1 deletions
|
@ -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()
|
||||
|
||||
_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
|
||||
|
|
Loading…
Reference in a new issue