Atom global for dealing with packages, themes, menus, and the window.
An instance of this class is always available as the atom
global.
A CommandRegistry instance
A Clipboard instance
A ContextMenuManager instance
A MenuManager instance
A KeymapManager instance
A TooltipManager instance
A NotificationManager instance
A GrammarRegistry instance
A HistoryManager instance
A PackageManager instance
A ThemeManager instance
A StyleManager instance
A DeserializerManager instance
A ViewRegistry instance
A Workspace instance
A TextEditorRegistry instance
This section only has Extended methods.
Invoke the given callback whenever ::beep is called.
Argument | Description |
---|---|
|
Return values |
---|
Returns a Disposable on which |
Invoke the given callback when there is an unhandled error, but before the devtools pop open
Argument | Description |
---|---|
|
Function to be called whenever there is an unhandled error |
|
|
|
Object the original error object |
|
String the original error object |
|
String Url to the file where the error originated. |
|
|
|
|
|
Function call this to avoid popping up the dev tools. |
Return values |
---|
Returns a Disposable on which |
Invoke the given callback whenever there is an unhandled error.
Argument | Description |
---|---|
|
Function to be called whenever there is an unhandled error |
|
|
|
Object the original error object |
|
String the original error object |
|
String Url to the file where the error originated. |
|
|
|
Return values |
---|
Returns a Disposable on which |
Invoke the given callback as soon as the shell environment is loaded (or immediately if it was already loaded).
Argument | Description |
---|---|
|
Function to be called whenever there is an unhandled error |
Gets the release channel of the Atom application.
Return values |
---|
Returns the release channel as a String. Will return one of |
Get the time taken to completely load the current window.
This time include things like loading and activating packages, creating DOM elements for the editor, and reading the config.
Return values |
---|
Returns the Number of milliseconds taken to load the window or null if the window hasn’t finished loading yet. |
Get the load settings for the current window.
Return values |
---|
Returns an Object containing all the load setting key/value pairs. |
Open a new Atom window using the given options.
Calling this method without an options parameter will open a prompt to pick a file/folder to open in the new window.
Argument | Description |
---|---|
|
An Object with the following keys: |
|
|
|
A Boolean, true to always open a new window instead of reusing existing windows depending on the paths to open. |
|
A Boolean, true to open the window in development mode. Development mode loads the Atom source from the locally cloned repository and also loads all the packages in ~/.atom/dev/packages |
|
A Boolean, true to open the window in safe mode. Safe mode prevents all packages installed to ~/.atom/packages from loading. |
Close the current window.
Get the size of current window.
Return values |
---|
Returns an Object in the format |
Get the current window
Move current window to the center of the screen.
Focus the current window.
Show the current window.
Hide the current window.
Reload the current window.
Relaunch the entire application.
Set the full screen state of the current window.
Toggle the full screen state of the current window.
Visually and audibly trigger a beep.
A flexible way to open a dialog akin to an alert dialog.
If the dialog is closed (via Esc
key or X
in the top corner) without selecting a button
the first button will be clicked unless a “Cancel” or “No” button is provided.
Argument | Description |
---|---|
|
An Object with the following keys: |
|
The String message to display. |
|
optional
The String detailed message to display. |
|
optional
Either an array of strings or an object where keys are button names and the values are callbacks to invoke when clicked. |
Return values |
---|
Returns the chosen button index Number if the buttons option is an array or the return value of the callback if the buttons option is an object. |
This section only has Extended methods.
Open the dev tools for the current window.
Return values |
---|
Returns a Promise that resolves when the DevTools have been opened. |
Toggle the visibility of the dev tools for the current window.
Return values |
---|
Returns a Promise that resolves when the DevTools have been opened or closed. |
Execute code in dev tools.