-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Feature to associate file types with external editors #15088
Conversation
{ | ||
"name": "brackets-open-external_application", | ||
"dependencies": { | ||
"open": "0.0.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
open module does not seem to be latest.
Quoting https://www.npmjs.com/package/open
Note: The original open package was previously deprecated in favor of this package, and we got the name, so this package is now named open instead of opn. If you're upgrading from the original open package (open@0.0.5 or lower), keep in mind that the API is different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
above 0.0.5 , open module version starts with 6.0.0. Open module starting 6.0.0 is not compatible with node version 6.11.0.
It gives below error when requiring module:
const wslToWindowsPath = async path => {
^^^^
SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
src/file/FileUtils.js
Outdated
*/ | ||
function addExtensionToExternalAppList(ext) { | ||
|
||
if(typeof ext !== 'string') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add check for list instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please have a look at node_module named open.
Feature to associate file types with external editors
in this PR, added an extension to which read User preferences "externalApplications" wher users can associate an external Applications to any file type:
sample Prefernces:
"externalApplications": {
"jpg": "default",
"doc": "notepad"
}
in this case double click on a jpg file in file tree, jpg file will be opened in its associated os default Application and ,doc file will be opened in notepad Application.
@swmitra @shubhsnov @sobisht @narayani28 Please review