• Packages
  • Themes
  • Documentation
  • Blog
  • Discuss
Sign in

browse

Adds commands that let you quickly browse Atom-related folders or reveal files you're working on
idleberg
3.4.0 65,803
5
  • Repo
  • Bugs
  • Versions
  • License
Flag as spam or malicious

browse

apm apm apm CircleCI David

Description

Adds commands that let you quickly browse Atom-related folders or reveal files you're working on (details below)

Screenshot

Installation

apm

Install browse from Atom's Package Manager or the command-line equivalent:

$ apm install browse

Using Git

Change to your Atom packages directory:

Windows

# Powershell
cd $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

Usage

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

Settings

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

Service Provider

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 provider
  consumeBrowse(browse) {
    this.browse = browse;
 
    return new Disposable(() => {
      this.browse = null;
    });
  },
 
  // Example function that consumes the service
  async revealFile(pathToFile) {
    await this.browse({
      action: 'reveal',
      target: pathToFile
    })
  },
 
  // Optional: Assign command for your reveal function
  activate() {
    this.subscriptions = new CompositeDisposable();
 
    this.subscriptions.add(atom.commands.add('atom-workspace', {
      'my-package:reveal-file': async () => await this.revealFile('/path/to/file')
    }));
  }
}

Options

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

License

This work is licensed under the MIT License

I think this package is bad news.

Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.

  • Terms of Use
  • Privacy
  • Code of Conduct
  • Releases
  • FAQ
  • Contact
with by