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

Make pinning of editors configurable #5554

Closed
csholmq opened this issue Apr 20, 2016 · 22 comments
Closed

Make pinning of editors configurable #5554

csholmq opened this issue Apr 20, 2016 · 22 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality file-explorer Explorer widget issues ux User experience issues workbench-tabs VS Code editor tab issues
Milestone

Comments

@csholmq
Copy link

csholmq commented Apr 20, 2016

There is a desire to configure preview editors via settings:

  • allow to always pin an editor when it opens
  • allow to always pin a file when it opens from quick open

Original Post:
I would expect Ctrl+P opening a new editor (which it does) and then adding that file to working files (which it doesn't). Instead the file is just revealed in the tree view and I have to double click on it to add it.

Surely Ctrl+P should be viewed as a "I mean to edit" action and not "Just a quick glance"? Does anybody else share my view?

@csholmq csholmq changed the title Go to file doesn't add to working files to file (Ctrl+P) doesn't add to working files Apr 20, 2016
@csholmq csholmq changed the title to file (Ctrl+P) doesn't add to working files Go to file (Ctrl+P) doesn't add to working files Apr 20, 2016
@bpasero bpasero changed the title Go to file (Ctrl+P) doesn't add to working files Go to file (Ctrl+P) should add to working files Apr 21, 2016
@bpasero bpasero added feature-request Request for new features or functionality ux User experience issues labels Apr 21, 2016
@bpasero bpasero added this to the Backlog milestone Apr 21, 2016
@bpasero bpasero added file-explorer Explorer widget issues and removed ux User experience issues workbench labels Apr 21, 2016
@stevencl
Copy link
Member

In the designs we discussed in issue #224 we talked about how preview editors would show up in the open editors list. When you use Ctrl+P to go to a file which is not already open it will be opened as a preview and will show up in the list of open editors.

@csholmq
Copy link
Author

csholmq commented Apr 21, 2016

So how does the Preview Tabs differ then? Do they disappear as soon as you switch to another editor?

@stevencl
Copy link
Member

In both cases, tab or editor groups contain one preview tab.

With tabs, a preview tab sits next to any other open tabs. Whenever you preview a new file, the content in the preview tab is refreshed with the content of the newly previewed file.

With the open editors/working files list, the name of the previewed file shows up in the list next to the other open editors. Whenever you preview a new file, the name of the newly previewed file replaces the name of the previously previewed file in the open editors list.

@csholmq
Copy link
Author

csholmq commented Apr 21, 2016

I see. Then I would prefer for Ctrl+P opening a file as permanent. Go to definition is another matter where a preview might actually be beneficial. But as it is now, my work flow seems to have files "vanish" since I try to work keyboard only and making an preview permanent requires double clicking.

@stevencl
Copy link
Member

Thanks for the suggestion. We will have a command that you can execute via some keybinding that will promote a preview tab to a permanent tab.

But we'll also spend more time thinking about the actions that cause a file to open in a preview tab or a permanent tab as we get deeper into the details when we start implementing these designs. We'll also consider a setting or some other way to specify when and how files are opened as preview or permanent tabs.

@Tyriar
Copy link
Member

Tyriar commented Apr 22, 2016

👍 for making this configurable

@csholmq
Copy link
Author

csholmq commented Apr 22, 2016

@stevencl Configuration sounds great!

@bpasero bpasero added the workbench-tabs VS Code editor tab issues label Apr 30, 2016
@bpasero
Copy link
Member

bpasero commented May 23, 2016

@stevencl it would be interesting in your study to find out if people are happy with a setting.

@nojvek
Copy link
Contributor

nojvek commented May 26, 2016

So is there any consensus on this whether ctrl+p will add to working files?

@bpasero
Copy link
Member

bpasero commented May 27, 2016

Probably will be a setting that is disabled by default.

@bpasero bpasero changed the title Go to file (Ctrl+P) should add to working files Add a setting so that Go to file (Ctrl+P) pins editors May 27, 2016
@bpasero
Copy link
Member

bpasero commented May 30, 2016

@csholmq would you want to still have preview editors when using the explorer? #2754 asks for having a way to open each file as pinned editor and I wonder if we should have just one setting that does this regardless from where you open a file?

@csholmq
Copy link
Author

csholmq commented May 30, 2016

@bpasero That sounds like a similar scenario. Opening a file from the explorer doesn't seem like you'd want a preview. But perhaps that's just my workflow. I use Total Commander, so I preview all my files using read-only notepad by pressing F3.

I see no problem with using the same setting.

@bpasero
Copy link
Member

bpasero commented May 30, 2016

@csholmq well the idea for preview editors in general is to reduce the number of tabs that get open when you click around. If we provide this setting most of the editors you open will be stable tabs and you will have to manage a lot more.

So it seems to me that the setting should be scoped to files only and then anywhere you open a file it will be pinned by default. Other editors (markdown preview, diff editors) would not be pinned by default even if this setting is enabled.

@Tyriar
Copy link
Member

Tyriar commented May 30, 2016

Personally I'd prefer a separate setting. I will often click around files in the explorer searching for what I want, so it may not be a file I'm interesting in keeping open. But quick find I know exactly what I want.

@nojvek
Copy link
Contributor

nojvek commented May 30, 2016

I'm totally fine with double clicking the tab to add as working tab or some
keyboard shortcut. As long as it's discoverable using tooltips.

On Monday, May 30, 2016, Daniel Imms [email protected] wrote:

Personally I'd prefer a separate setting. I will often click around files
in the explorer searching for what I want, so it may not be a file I'm
interesting in keeping open. But quick find I know exactly what I want.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#5554 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AA-JVGFQbF1pl3XXjda7-ZBh8B1tXAMAks5qGrNxgaJpZM4ILyEK
.

@csholmq
Copy link
Author

csholmq commented Jun 8, 2016

With the new preview tabs the experience is much better. Opening a file as a preview is now much clearer i.m.o.

I still think a configuration option is good though.

@bpasero
Copy link
Member

bpasero commented Jun 8, 2016

Since we have another request to have a config to pin each file I am wondering if we should just introduce one setting for both, along the lines of "editor.autoPinLevel" and you have "always", "moderate", "default" and based on those we derive how things pin. Not a big fan of introducing 2 options...

@stevencl
Copy link
Member

stevencl commented Jun 8, 2016

Visual Studio has a setting that enables or disables the preview tab in each tool window where files could be opened:
image

  • we could have something like previewTab.enableInExplorer {true/false}, previewTab.enableInQuickOpen, etc.

@bpasero
Copy link
Member

bpasero commented Jun 9, 2016

@stevencl having a hard time on making the decision around these settings. Do we really want to introduce a new top level settings category for this called previewTab? Should this not be an editor concept that should be put on the editor configuration key.

First question is, do we talk about preview or pin in the UI? So far we have only exposed pin as actions (Pin Editor and Unpin Editor) but never preview. I think for this setting it makes sense to introduce the notion of preview to the user though.

If we end up talking about preview editors, the setting could be editor.preview to globally enable or disable this feature (defaults to be enabled). However, we still miss a setting for controlling this from quick open. We could introduce search.preview but this does not make it clear if this is about quick open or fulltext search too?

@bpasero bpasero changed the title Add a setting so that Go to file (Ctrl+P) pins editors Make pinning of editors configurable Jun 9, 2016
@bpasero bpasero added the ux User experience issues label Jun 9, 2016
@stevencl
Copy link
Member

stevencl commented Jun 9, 2016

I agree, we should make this be about the editor. So would something like the following work?

"editor.preview.enableInExplorer": true,
"editor.preview.enableInQuickOpen": true

And I also agree that we should introduce the notion of preview. It's becoming a standard (Sublime and VS support the same experience for example) so I think will be well understood.

@bpasero
Copy link
Member

bpasero commented Jun 9, 2016

@stevencl actually looking into the future we will have a set of new configuration settings that are all coming from the fact that we now have stacks and tabs. More things to consider:

  • a setting to enable or disable tabs
  • a setting where to open a new editor (to the left or right of the active one or maybe always at the end of the stack or always at the beginning? see Allow to configure where editors open #6787)

I can also see that in the future we will have more users asking for configuration around this so maybe we come up with a category that solves this for all these settings under one parent key?

@bpasero
Copy link
Member

bpasero commented Jun 14, 2016

Discussion on settings names continues in #7643

@bpasero bpasero closed this as completed Jun 14, 2016
@bpasero bpasero added the *duplicate Issue identified as a duplicate of another issue(s) label Jun 27, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
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 file-explorer Explorer widget issues ux User experience issues workbench-tabs VS Code editor tab issues
Projects
None yet
Development

No branches or pull requests

6 participants