Adds commands that let you quickly browse Atom-related folders or reveal files you're working on (details below)
Install browse
from Atom's Package Manager or the command-line equivalent:
$ apm install browse
Change to your Atom packages directory:
Windows
# Powershellcd $Env:USERPROFILE\.atom\packages# Command Prompt$ cd %USERPROFILE%\.atom\packages
Linux & macOS
$ cd ~/.atom/packages/
Clone the repository as browse
:
$ git clone https://github.com/idleberg/atom-browse browse
Install dependencies:
cd browse && npm install
Once installed, you can run any of the following commands from the Command Palette.
Project-specific:
Browse: Project Folder(s)
Browse: Project Dependencies
(e.g. node_modules
, vendor
)Browse: Reveal File
Browse: Reveal Open Files
Atom-specific:
Browse: .apm Folder
Browse: Application Folder
Browse: App Data Folder
Browse: Configuration Folder
Browse: Packages Folder
Browse: Resources Folder
If you want to override your system's default file-manager, you can specify its path in the package settings.
browse:customFileManager:fullPath: "%PROGRAMFILES%\\Explorer++\\Explorer++.exe"
Furthermore, you can specify custom arguments for the open and reveal actions.
browse:customFileManager:openArgs: ["-o", "%path%"]revealArgs: ["-r", "%path%"]
Note: The %path%
placeholder can be omitted when it's the last argument
This package provides the service to open/reveal custom paths. To consume it, add the following to your package.json
:
{"consumedServices": {"browse": {"versions": {"1.0.0": "consumeBrowse"}}}}
Next up, you need to consume the service in your package's main file.
export default {// Assign service providerconsumeBrowse(browse) {this.browse = browse;return new Disposable(() => {this.browse = null;});},// Example function that consumes the serviceasync revealFile(pathToFile) {await this.browse({action: 'reveal',target: pathToFile})},// Optional: Assign command for your reveal functionactivate() {this.subscriptions = new CompositeDisposable();this.subscriptions.add(atom.commands.add('atom-workspace', {'my-package:reveal-file': async () => await this.revealFile('/path/to/file')}));}}
action
Type: string
Arguments: reveal | open
Specifies the default action for the service. You can open folders or reveal files in your file manager.
Note: As of version v3.1, this option can be omitted. The action will then be determined by whether target option resolves to a file or directory.
target
Type: string | string[]
Specifies the target path(s) that should be opened.
message
Type: string
Disables notification for action
silent
Type: boolean
Custom message to be displayed for the action
This work is licensed under the MIT License
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.