fix(keymaps): create user keymaps file in .nylas/ if non existent

This commit is contained in:
Juan Tejada 2015-11-06 18:55:33 -08:00
parent e87b5700e2
commit 9801529aa1

View file

@ -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