Vscode: Make open editors view extensible

Created on 23 Jun 2018  路  10Comments  路  Source: microsoft/vscode

Reopening this issue again, as I (and other community members) believe this is _rudimentary_ functionality of _any_ editor and should _not_ be left to extensions.

Quite simply, an option to rename and delete files on/from disk should be offered as a right-click option in the Explorer pane, for currently open editors. This is essential when editing files which are external from the current workspace/directory (i.e. one-off edits). Items can be moved by means of dragging and dropping into different folders, so why should renaming and deleting be left out?

The solution of "Open the parent folder to enable these functions" should not be honored, as this is not suitable for single-file projects, and files opened using "Open with Code" from Windows Explorer.

References: #30400 #1886

feature-request open-editors

Most helpful comment

I think the fact that 4 issues have been opened now regarding this shows that something needs to be done about it.

For the programmer, there is no visual indication that the Open Editors pane is solely for view management and not FS, as it appears identical to any open workspace drop-down.

All 10 comments

What? You can Rename and Delete files in the explorer pane though?

Demo of functionality referenced

Oh I see, I'm totally with you that this seems basic functionality of a text editor. Full support

Thanks, issue clarified.

@isidorn I would like to implement this, I'll need some guidance though.

I'm able to add the options to the menu on open editors but they don't work. I guess something on the implementation of the renameHandler and deleteFileHandler prevent them from working on the OpenEditorsContext menu as they do on the ExplorerContext menu.

I can leave this featre request open for now even thuogh I disagree that this should be part of the open editors pane. It is a view only for managing the view state, not fs.
We do not accept PRs that fix this at the moment. Thanks

I can leave this featre request open for now even thuogh I disagree that this should be part of the open editors pane. It is a view only for managing the view state, not fs.

Well, that's a very puristic and little pragmatic view. And it not even true - there is 'Save' and 'Revert File' which following your logic shouldn't be there.

screen shot 2018-08-29 at 14 29 08

I think the fact that 4 issues have been opened now regarding this shows that something needs to be done about it.

For the programmer, there is no visual indication that the Open Editors pane is solely for view management and not FS, as it appears identical to any open workspace drop-down.

I have several times wanted to rename an opened file (e.g. a newly drafted external text note) which is not in workspace, but need to go to Finder to rename it. This action is so frequently used... really wish it either supported in "Open Editors" section, or in tab's context menu, or in a Command Palette action for the current document.

A disadvantage for renaming it outside is that the originally opened document will be marked "(deleted from disk)" and need to be re-opened, and recent file list cannot be auto-updated.

It is also, apart from other operations I think, the most intuitively needed, and spend most (extra) manual steps to accomplish if no core feature to support. (e.g. Duplicate -> can use Save as..., Move -> need browse target directory, so go to file explorer isn't dummy)

Thanks.

And I strongly prefer having a Command Palette action to "Rename File", then no need other mouse or shortcut actions to go to View -> Explorer's Open Editors or Workspace Files to rename. :-)

Not agree this as extension, as both Sublime Text & Notepad++ have it. There is reason as I mentioned above. (refer #43344, #21918)

I was trying to find rename for minutes before I realized I had to go to the browser section instead of grouping to do it. So it's indeed confusing. Things should be 1:1 with file manipulations whether they are in open editors or in browser.

Here's another workflow.
Open single text file i VSC. This is assigned to a group and not in the browser. Renaming is not possible from VSC.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sirius1024 picture sirius1024  路  3Comments

chrisdias picture chrisdias  路  3Comments

DovydasNavickas picture DovydasNavickas  路  3Comments

mrkiley picture mrkiley  路  3Comments

shanalikhan picture shanalikhan  路  3Comments