This package provides:
This package consumes:
Open files and directories in external programs. Useful for files that cannot be viewed in Pulsar or require specialized applications.
To install open-external search for open-external in the Install pane of the Pulsar settings or run ppm install open-external. Alternatively, you can run ppm install asiloisad/pulsar-open-external to install a package directly from the GitHub repository.
Commands available in atom-workspace:
open-external:toggle: (Alt+U) quick switch.Commands available in atom-text-editor:not([mini]), .image-view, .image-editor, .pdf-viewer:
open-external:open: (Alt+F12) open active file in external program,open-external:show: (Ctrl+F12) show active file in file manager.Commands available in .tree-view:
open-external:open: (Alt+F12) open selected items in external programs,open-external:show: (Ctrl+F12) show selected items in file manager.The package provides a open-external service for other packages. This enables packages to:
service.registerHandler(handler) // Returns Disposable
service.openExternal(filePath) // Opens file externally
service.showInFolder(filePath) // Shows file in file manager
{
priority: 10, // Required: higher = called first
openExternal(filePath) { ... }, // Optional: return null to pass to next handler
showInFolder(filePath) { ... }, // Optional: return null to pass to next handler
}
In your package's package.json:
{
"consumedServices": {
"open-external": {
"versions": {
"^1.0.0": "consumeOpenExternalService"
}
}
}
}
In your package's main file:
module.exports = {
consumeOpenExternalService(service) {
return service.registerHandler({
priority: 10,
openExternal(filePath) {
if (!filePath.endsWith('.myext')) return null;
// Custom opening logic
console.log('Opening', filePath);
return true;
}
});
}
}
Got ideas to make this package better, found a bug, or want to help add new features? Just drop your thoughts on GitHub — any feedback's welcome!