mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Add command to open user config in an editor
This commit is contained in:
@@ -98,6 +98,10 @@ class Config
|
||||
_.extend hash, defaults
|
||||
@update()
|
||||
|
||||
# Public: Get the path to the config file being used.
|
||||
getUserConfigPath: ->
|
||||
@configFilePath
|
||||
|
||||
# Public: Returns a new {Object} containing all of settings and defaults.
|
||||
getSettings: ->
|
||||
_.deepExtend(@settings, @defaultSettings)
|
||||
|
||||
@@ -125,6 +125,7 @@ class WorkspaceView extends View
|
||||
|
||||
@command 'window:open-your-stylesheet', => @model.openUserStylesheet()
|
||||
@command 'window:open-your-keymap', => @model.openUserKeymap()
|
||||
@command 'window:open-your-config', => @model.openUserConfig()
|
||||
|
||||
# Private:
|
||||
handleFocus: (e) ->
|
||||
|
||||
@@ -46,6 +46,10 @@ class Workspace extends Model
|
||||
openUserKeymap: ->
|
||||
@open(atom.keymap.getUserKeymapPath())
|
||||
|
||||
# Private: Open ~/.atom/config.cson or ~/.atom/config.json
|
||||
openUserConfig: ->
|
||||
@open(atom.config.getUserConfigPath())
|
||||
|
||||
# Public: Asynchronously opens a given a filepath in Atom.
|
||||
#
|
||||
# * filePath: A file path
|
||||
|
||||
Reference in New Issue
Block a user