diff --git a/src/config.coffee b/src/config.coffee index 24990ab51..68a7b464f 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -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) diff --git a/src/workspace-view.coffee b/src/workspace-view.coffee index dee32fcdc..d8aeebda4 100644 --- a/src/workspace-view.coffee +++ b/src/workspace-view.coffee @@ -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) -> diff --git a/src/workspace.coffee b/src/workspace.coffee index 52b05bb0c..57c5c2997 100644 --- a/src/workspace.coffee +++ b/src/workspace.coffee @@ -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