VS Code editor, unlinking explorer pane and editor tabs - visual-studio-code

When I click on an editor tab the focus in the explorer pane shifts to the file in question. This seems pointless to me. Can I stop this from happening? Obviously I want to continue being able to click on a file in the explorer pane and for the relevant tab to open or come up in the editor.
You may be wondering why I want this. It's because one of my open files is way down the explorer pane list and the files I want to see in the pane are up at the top of the list.

Related

VSCode "Open Editors" panel not showing

I don't know what I have done but I cannot see the "Open Editors" panel in the Explorer view
I note also that clicking on the three dots (Views and More Actions...) to the right of the word Explorer at the top of the explorer panel the word Folders is greyed out
Can anyone point me to the setting I need to change in order to rectify this situation?
Just in case anyone else has the same problem here is how I resolved my issue. I won't bore you with how I discovered the solution.
Right-click in the activity bar, this will bring up a context menu with the entry for Open Editors listed but not marked with a tick
Activity bar context menu.
Clicking on "Open Editors" in this context menu brings up a new icon in the activity bar that looks like an open book
Open Editor icon
Right-clicking on this new icon reveals another context menu that includes the option to reset the location of the Open Editors panel.
Open Editor context menu
Selecting this option resolves the problem.
How I got into the problem in the first place is still difficult to ascertain. With the activity bar in its default configuration I must have dragged the "Open Editors" header to somewhere on the activity bar, that clearly removes it from the Explorer side bar but how I inadvertently right clicked this new icon and selected "Hide 'Open Editors'" without realising remains a mystery.
Go to view and click on Open View and the on Open Editors.
3 dots on extreme right hand side has an option - keep editors open --> set it to default view. Once done the open editor will be be visible on the left.
This is considering you have default vs code layout...
I am currently using version: 1.68.1
In VS Code, go to Settings and in the search box, type explorer.openEditors.visible. Set the value in the dialogue box to any number greater than 0 and you are good to go. Refer to the image below.

save search on visual studio code

I am having a trouble with VS code. I would like to save the search results so I can get back to it again. specially since there is a lot of results and I do delete/filter them manually by clicking on x dismiss button.
I used the Open in editor, which open new tab with all results however it's not useful since I can browse the results quickly or reopen it again in the search pane.
Regards,
From I believe version 1.41 of VSCode you have a separate search editor which I guess will do what you're looking for.
Just open you command palette and search for "Open search editor". You will be presented with a couple options (open and open to the side).
When you have some search results which you want to save, you can click on the "Open in Editor" link shown next to the results summary.
This will open a text file with the similar search bar on top, and your current search results will be loaded in a text file format. You can press Ctrl-S or use File > Save to save it in a .code-search file.
You can close and re-open this file any time to view the results. You can click "Search Again" to refresh the results (note, this will lose any customization and bring back dismissed results). You can use Ctrl-click to jump to files or lines mentioned in the search results.
Unfortunately you cannot reload this back into the search pane (AFAIK). However, since Editor pane can be split, you can split this file's editor to a separate pane on the side, and close the Search pane.

Eclipse - Can't View or Open Java files in Package Explorer to Editor

I clicked something or accidentally drug a file that was open in the editor and now it is no longer displayed.
If I double click on the file in Package Explorer it doesn't show in the editor like it used to. I have looked all over and can't figure out how to get this file back in the editor.
I thought clicking File - Open File would do it but that displays an open file dialog.
Another way to simulate this is to put the cursor in the editor for an open file and select File - Close. This closes the file but then if you double click on the file in the Package Explorer it doesn't open it in the editor anymore. How do I get these files to display in the editor again?
I also tried right clicking on the file and selecting "Open". This does not display in editor either.
I also tried right clicking and selecting "Open With Java Editor". This does not work either.
If I clicke "File" and then the name of the file in the MRU list . This does not work either.
Also, double clicking a file in Package Explorer fails to open any file. The file shows in the File MRU list but does not display in editor. Can not figure this out.
Also, if I select "Back to" or "Forward to" arrows on toolbar, it tracks the file in the Package Explorer by highlighting it but the file does not display in an editor like it used to.
Also, I have tried "File Open" browsing to the physical location and selecting it but that does not display in the editor either.
I had to open a new window (Window - New Window) and then Reset Perspective (Window - Reset Perspective) to get the editor back. Not sure why but I lost some of my perspective settings doing this.
In Package Explorer, instead of double-clicking on the file, try to right-click it and you should get several "Open with..." options; choose the one that matches the editor in which you want the file to open.
Your choice will also be saved as the default, so the next times you can just double-click and it will open in that same editor.
If you are customizing the perspective, then saving perspective could be a safer option to avoid such glitches.
PFB the link on how to save a perspective:
http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2FgettingStarted%2Fqs-43e.htm

pydev: package explorer disappears when file is openend

Silly question, but I don't know what to do:
My view in Eclipse pydev has changed;
Don't know what I did It used to be that the Pydev package explorer would appear on the left and then whatever file I selected would appear on the right, in the editor area. Instead, Pydev now opens a blank window.
I can make the Pydev package explorer appear by selecting it from the little icon on the lower left. However, when I then click on a file, the file opens, but the explorer disappears. Very annoying.
You probably made the package explorer work as a 'fast view'. You can do the following: Ctrl+F7 until you reach it (this keybinding should allow you to pass through the opened views), then alt+- (which should open the view menu) and deselect the 'fast view'.

Change or switch to different editor quickly in eclipse ? ( not tabs)

Hi i many html editors in eclipse. each one provides different features.
Is there a way i can quickly switch the editor of current opened tab, ( other than open with option in the project explorer).
Lets say abc.html is currently open. but i want to open it in different editor. Now i have to search that file in the project explorer and then right click > open with. option.
OR
I use ctrl+shift+r to open any resource , it always opens in default editor. But i want to choose there which editor to open with" option there. :(. is there any shortcut for that?
I can well understand wanting to open stuff just using the keyboard.
I can think of 2 solutions:
1: CTRL + SHIFT + R (select file as normal) then (still in the Open Resource dialog) TAB, TAB, ENTER and then press the down arrow key until you get the right editor
2: Keep the Project Explorer 'Link with Editor' toggle on (a button on the top right of the Project Explorer View)
Now you can easily get from the file open in the editor to the correct place in the Project Explorer view (so you can right click on it).
Hope this helps!
(I also find CTRL + F7 a useful way of switching to the Project Explorer view from an editor)