Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for custom editors registered via file extensions #5604

Closed
pietie opened this issue Apr 21, 2016 · 11 comments
Closed

Support for custom editors registered via file extensions #5604

pietie opened this issue Apr 21, 2016 · 11 comments
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality workbench-editors Managing of editor widgets in workbench window

Comments

@pietie
Copy link

pietie commented Apr 21, 2016

Similar to Visual Studio extensions, I would like to register a specific file extension and swap out the code editor for a custom UI experience when that file opened.

@dbaeumer dbaeumer added this to the Backlog milestone Apr 21, 2016
@dbaeumer dbaeumer added the feature-request Request for new features or functionality label Apr 21, 2016
@dbaeumer
Copy link
Member

@bpasero @alexandrudima @jrieken FYI.

@bpasero
Copy link
Member

bpasero commented Apr 21, 2016

I am tempted to close this one because I do not think our goal would ever be to support this scenario. But since I cannot look into the future, I leave it open.

@bpasero bpasero self-assigned this Apr 21, 2016
@bpasero bpasero changed the title Support for custom editor extensions Support for custom editors registered via file extensions Jul 12, 2016
@bpasero bpasero removed their assignment Aug 17, 2016
@zzmingo
Copy link

zzmingo commented Feb 21, 2017

+1, I read vscode API and source, try to find a way open a custom editor, it seems can't be done with extension API.

@TomMarius
Copy link

+1, I'd like to develop a React-based UI designer coupled with a code editor

@RobertBColton
Copy link

RobertBColton commented Jun 15, 2017

One current way to do this is using the HTML preview for the GUI. HTML does have checkboxes, textfields, etc. I haven't checked if it is possible but you should be able to save the file path and immediately write-back changes in the HTML preview to the file. Or you could add a redundant save button to the HTML preview.

https://github.com/Microsoft/vscode-extension-samples/tree/master/previewhtml-sample

+1 Because I still feel VS Code needs more robust custom editor extension authoring. The preview work around doesn't really fit with the intended use of the feature.

The number of use cases VS Code would be able to cover would be greatly extended if this feature were implemented. For example, I am currently investigating its use as a project editor for a game engine where this would be extremely useful.

Also, important to mention that this is offered in atom.io as an extension point:
https://atom.io/docs/api/v1.17.2/Workspace#instance-addOpener

@cwtuan
Copy link

cwtuan commented Sep 1, 2017

Any plan for "real" custom UI?

@bpasero bpasero added workbench-editors Managing of editor widgets in workbench window and removed editor labels Nov 16, 2017
@bpasero bpasero removed this from the Backlog milestone Nov 17, 2017
@navneet-g
Copy link

+1 ... I want to build an extension that supports a blockly based experience where kids can code using blocks rather than write code ... Something similar to MIT Appinventor or Scratch.

@dschaefer
Copy link

dschaefer commented Feb 2, 2018

+1 We have system trace files that I'd like to be able to open my own editor to view the trace graphically using html preview. Otherwise it opens as an unknown binary type.

Note that I can do this with my own tree provider. I really just want to do the same in the file explorer for certain file extensions or more generally language modes, i.e. to be able to specify an open command that overrides the default behavior. As a bonus, it would be awesome to hook it up to the dirty bit for the file editor input to make it feel like a real editor.

If I figure out how to do this cleanly, would you be open to a pull request?

@egamma
Copy link
Member

egamma commented Feb 2, 2018

@dschaefer another approach is that you contribute a command to the explorer´s context menu for this particular file type that opens the trace graphically.

@dschaefer
Copy link

Thanks @egamma yes, I'll do that for the protoype. But it's not a good user experience. It'll be hard to explain why these files don't open like other files in their workspace, especially since the error message says "the file will not be displayed". I think we should be making every attempt for that message not to be displayed, including allowing some other editor, or command at least, to take care of it.

@bpasero
Copy link
Member

bpasero commented Feb 6, 2018

Closing as duplicate of #12176 (which has more votes).

@bpasero bpasero closed this as completed Feb 6, 2018
@bpasero bpasero added the *duplicate Issue identified as a duplicate of another issue(s) label Feb 6, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality workbench-editors Managing of editor widgets in workbench window
Projects
None yet
Development

No branches or pull requests

10 participants