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

File explorer opens file under cursor on [Esc] key. #24232

Closed
LexRiver opened this issue Apr 7, 2017 · 18 comments
Closed

File explorer opens file under cursor on [Esc] key. #24232

LexRiver opened this issue Apr 7, 2017 · 18 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@LexRiver
Copy link

LexRiver commented Apr 7, 2017

  • VSCode Version: Code 1.11.1 (d9484d1, 2017-04-06T13:58:12.954Z)
  • OS Version: Windows_NT ia32 6.1.7601

Steps to Reproduce:

  1. Switch to File Explorer
  2. Move cursor to another file
  3. Hit [Esc]

Expected behavior:

  • return to editing current file

Current behavior:

  • open file under cursor
@bpasero
Copy link
Member

bpasero commented Apr 7, 2017

@LexRiver what do you do exactly, can you share a video?

@bpasero bpasero added the info-needed Issue requires more information from poster label Apr 7, 2017
@bpasero bpasero added this to the Backlog milestone Apr 7, 2017
@LexRiver
Copy link
Author

LexRiver commented Apr 7, 2017

Is it just me?

  1. hit Ctrl+Shift+E to activate explorer
  2. hit Down to select next file
  3. hit Enter to open file
  4. hit Ctrl+Shift+E to activate explorer again
  5. hit Up to select first file again
  6. hit Esc <- this opens first file again, instead of focus on editor

If this is just me, then sorry.

@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Apr 7, 2017
@bpasero bpasero modified the milestones: April 2017, Backlog Apr 7, 2017
@bpasero bpasero closed this as completed in 51d3ae8 Apr 7, 2017
@bpasero
Copy link
Member

bpasero commented Apr 7, 2017

I can reproduce and fix.

@Tekbr
Copy link

Tekbr commented Apr 10, 2017

-- Sorry for the English, I used Google Translator --

  • VSCode Version: Code 1.12.0 (61753c0)
  • OS Version: Windows 10

@bpasero Now when you click Esc the focus is not going back to the file you were editing, but getting a blue border, time in "Open Editors" time in the whole project.

Can you reproduce?

The change that only affects where all the files are or also for "Open Editors"?

@bpasero
Copy link
Member

bpasero commented Apr 11, 2017

@Tekbr there was no change for "Open Editors", only the "Files Explorer" below.

@Tekbr
Copy link

Tekbr commented Apr 11, 2017

@bpasero
My steps:
1- I typed the text
2 - Press Ctrl + Shift + E
3- I navigated through the file with the up and down arrows
4- I pressed Esc.
5- Focus still continued in the archives
6- I pressed Esc.
7- Focus continued in File Explorer

Was not the idea to return the focus of the cursor to editing the file? 🤔

explorer

@bpasero
Copy link
Member

bpasero commented Apr 12, 2017

No, that was not the idea.

@LexRiver
Copy link
Author

I was expecting to continue editing the opened file also -)

@Tekbr
Copy link

Tekbr commented Apr 12, 2017

-- Sorry for the English, I used Google Translator --

@bpasero In my view the idea was always this.

Expected behavior:

  • return to editing current file

It may be a lack of interpretation or even wrong understanding.

Notice that @LexRiver himself said again that the idea was to go back to the edited file.

I was expecting to continue editing the opened file also -)

For me it got worse than before. I vote for reopening the issue, and check if it's possible to do this by going back to the file. I do not know if @LexRiver agrees.

@bpasero
Copy link
Member

bpasero commented Apr 12, 2017

How about assigning a keybinding that ESC puts focus to the editor when pressed while the explorer has focus?

Otherwise I do not understand the request to reopen this bug that was fixed, sorry.

@Tekbr
Copy link

Tekbr commented Apr 12, 2017

-- Sorry for the English, I used Google Translator --

Otherwise I do not understand the request to reopen this bug that was fixed, sorry.

@bpasero Corrected in parts, because that was not what was asked for. Sorry for the sincerity. 😉

Before I used it in a different way, a "jerry-rig" (I think that's the English term, if not sorry), but that worked more or less. And that stopped after the update. I looked for the case and found this one. But that is beside the point.

How about assigning a keybinding that ESC puts focus to the editor when pressed while the explorer has focus?

I do not understand much, but I guess that's what I mean?

The idea is to work as in Atom.

1- Type a text
2 - Press Alt + \
3- Navigate between files and with up and down arrow
4- Press Esc.
5 - See that it returns to the editor
6 - See that the focus (this white color where I stopped stays there)
7- Re-press Alt + \
8- The same back where you left the cursor.

esc atom

For VSCode my idea is (see if @LexRiver agrees):

1- Type a text
2 - Press Ctrl + Shift + E
3- Navigate between files and with up and down arrow
4- Press Esc.
5- Back to the Editor
6- Keep focus (This gray color in the file I'm editing)
7- Press Ctrl + Shift + E again
8- The same lap where you leave the cursor (with this light blue color) and the file that is open (with the darker blue color). That already happens. But it is interesting to keep.

esc vscode


@bpasero Tell me if I need to open a new issue for this situation.

This step is now something I hate about VSCode (especially now after it's changed), and if it can be fixed (or if it's a config), it has a bit of a bearing on that case. (I do not know if you'll understand, sorry for English again)

1- Type a text
2 - Press Ctrl + Shift + E
3- Navigate between files and with up and down arrow
4- Press Esc.
5- The Focus is still in the archive tree.
6- Press Esc again
7- The Focus is in the rectangle that is the file tree.
8- Click the editor or press Ctrl + Shift + E again
9- Press again Ctrl + Shift + E
10- Focus goes to Open Editors

esc vscode mudar

This is very boring!!

Maybe Ctrl + 0 (not numeric) will focus on Open Editors and Ctrl + Shift + E in the file tree.
As I said in another case, I know that Ctrl + 0 may not be his job, but for that I think it works well. If you have a better idea, tell me.

@bpasero
Copy link
Member

bpasero commented Apr 18, 2017

@Tekbr just configure this in your keybindings file:

{ "key": "escape", "command": "workbench.action.focusActiveEditorGroup", "when": "explorerViewletFocus" }

I can see how previously we would focus back the editor on escape, but this behaviour was actually just a bug (as reported by LexRiver). It was never the intention to do so and we are not doing so in other views.

@Tekbr
Copy link

Tekbr commented Apr 21, 2017

-- Sorry for the English, I used Google Translator --

@bpasero Sorry for the delay in responding !!

Yes, your tip worked for Esc. (Should have come by default). It's possible?

But I do not understand why the focus (blue bar in the files tree).

Do these steps (using only the keybindings that you mentioned above):
1- Have a project with two or more files open.
2- Click the blank area in the file tree.
3- The focus is on the whole area.
4- Press Esc.
5. Press Ctrl + Shift + E .
6- Focus goes to Open Editors.

Another situation:
1- Have a project with two or more files open.
2- Close the folder.
3- Open the project again.
4 - Press Ctrl + Shift + E.
5- Focus goes to Open Editors.

I searched and found "Focus on Open Editors" Ctrl + k E. That is, it does not make sense to me when I hit Ctrl + Shift + E in the above situations it points to Open Editors.

If you were confused or did not understand something, let me know. Or make a gif if you prefer. Sorry for using Google Translate.

@bpasero
Copy link
Member

bpasero commented Apr 23, 2017

The blue focus in the tree is for accessibility reasons, you can start to arrow up or down in this mode to start selecting entries from the tree.

@Tekbr
Copy link

Tekbr commented Apr 23, 2017

-- Sorry for the English, I used Google Translator --

@bpasero Question 1: But did you do the steps I spoke up? Should this really happen?

you can start to arrow up or down in this mode to start selecting entries from the tree.

Question 2: Yes, but I can not access the main folder with the up and down arrow. If I want to create a new folder or a new file, using the 'Menu' key, right? Or am I doing something wrong?

@bpasero
Copy link
Member

bpasero commented Apr 24, 2017

Agree, in your case focus should go back to the explorer even though it has no focused item.

@Tekbr
Copy link

Tekbr commented Apr 25, 2017

-- Sorry for the English, I used Google Translator --

  • @bpasero The intention if your answer was not clear to me. Is it a problem or do I have to make a request? I believe your answer is about my first question.

  • About my second question would it also be a resource request? Did you get the point?

If what I have written is confusing, please let me know that I will try to write in another way. 😉

@bpasero
Copy link
Member

bpasero commented Apr 25, 2017

@Tekbr let's tackle individual issues in individual bug reports, makes it easier to track. Feel free to open new issues as you see fit.

@jrieken jrieken added the verified Verification succeeded label Apr 26, 2017
@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
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants