Command to go to previous file in Eclipse editor - eclipse

In visual studio ctrl+tab would bring the previous viewed file back to the foreground. I can't seem to recreate this simple behavior in any of the obvious eclipse commands, and I am not permitted to install any 3rd party plugins that might add this functionality.
I have found commands that take me through the previous edit locations (which could be mulitple locations per file), that switch to the next and previous file in file tab order, but no command that will take me to the last viewed file.
Is this just not available?

Enter Ctrl + F6 key .It will take you to last opened file in eclipse.

Related

VS Code does not see existing file

Apparently VS Code does not list existing files in files dropdown (Ctrl + P command).
Here is what it shows:
As you can see, the file laravel-2019-09-26.log exists in the directory (left bottom), but not in the files dropdown. After I open this file from the Explorer tree, it starts showing in the dropdown.
Am I doing something wrong or does this happen for everyone? Or is this command supposed to show previously opened files only? If so, what is the way to quickly open any existing file in the workspace?
N.B: I have gone through this related question. No one has mentioned this problem, making me think that this might be specific to my machine.
Edit
For future readers, second answer provided by #michaelze is spot on. VS Code by default does not list files mentioned in .gitignore. You can change this setting by going to Settings panel (File > Preferences > Settings) and typing useIgnoreFiles. This will bring up two boolean settings named Use Global Ignore Files and Use Ignore Files. Turn off these two settings and all workspace files will start showing in the files dropdown. Works correctly as of version 1.38.1.
As those files are .log files, I assume, they are maybe mentioned in the .gitignore file? Maybe this can help you? Visual Studio Code - Automatic exclude based on .gitignore
The list you are seing when pressing CTRL + P is called recently opened. When you open one of the files, it was recently open, so it shows up. The CTRL + P menu also has a files results section that lists actual search results from the files you have in your workspace. None of your .log files are showing up in this section (hence the section is not visible).
The laravel-2019-09-08.log file is also missing from the drop down.
I was wondering if maybe the listing is capped to a certain number of files. Try to be more specific with your search. In my version of VSCode, I can search for files using multiple words. Maybe try searching for "laravel 26" to find the file you are looking for?

How to quickly find files or symbols in a project in visual studio code?

Here's a demonstration of the feature in IntelliJ (https://www.youtube.com/watch?v=EtnI2doW6XE)?
In case the video isn't viewable, basically the user presses a key-combo, and a dialog box pops up that will reactively response and filter based on the string the user starts to type in. It will show classes and files (and much more) matching what you've typed in. I won't go in to all the details, as I'm not looking for an exact match to this functionality -- I'd be happy if it just searched based on file name for starters! Anything to prevent me from having to browse for a filename in the project Explorer to open the file in vs code when I want to switch to the given file.
I saw How do I search for files in Visual Studio Code? - for me (on Linux) Ctrl-E just shows the file I currently have open under the project explorer (useful sometimes, but not what I'm looking for).
Cmd + P opens a search bar for files (doc),
Cmd + T opens a search bar for symbols (doc),
Are you just looking for CTRL-P That brings up a file list. Which is searchable. You can then tab down and right arrow opens up that file. Enter will open a split editor on the file.
Also, if you CTR-p and then type ? you will get a list of keys you can hit such as to "Go to Symbols" and much more in your file or workspace.
And look at CTRL-R it probably does exactly what you are looking for as far as files go.

Shortcut for selecting run configuration in Eclipse IDE

I have an Eclipse workspace with a bunch of projects. I manually created some run configurations for each project (it's necessary to pass some arguments to VM, so I can't just run it directly, e.g. using shortcut ALT+SHIFT+X, T in the specific file).
Most of the time, I just use one run configuration (whereas for the first time I manually launch it using Run -> Run configurations -> (name) -> Run). Since I configured Eclipse to always run the last run configuration (on F11 or CTRL+F11), it's usually enough.
However, sometimes I need to switch to a different run configuration and then back to previous one and then to a different one etc. Is there a quick way to do it? I'd like to see a shortcut, which would display pop-up window with all existing run configurations. By typing first few letters, I'd find an appropriate one and would be able to immediately run it by pressing ENTER. I mean something similar to what CTRL+SHIFT+T or CTRL+SHIFT+R looks like.
I'm afraid there's not something like that. Nonetheless, any advice on how to get more effective would be greatly appreciated, because I'm bored of switching run configurations via menu (as I described above). I can press ALT+R, N and then select a run configuration using arrow keys, but it's not really that comfortable.
You already gave most of the answer yourself. Start by pressing ALT+R, N and then simply start typing the name of the configuration you want. The cursor should be positioned in the filter field and thus incrementally reduce the list of launch configurations as you type. When you've narrowed it down to 1, complete the selection by ALT+R.
BTW: thanks for the reminder, I, too, was using the mouse way too much in this particular use case. I will stop doing so, now that I gave the answer :)
Since Eclipse 4.12 (June 2019, 4 years later) you can also launch any of the Run or Debug configurations available in your workspace from... the Quick Access menu (Ctrl+3 shortcut)
Note: For performance reasons, the extra Quick Access entries are only visible if the org.eclipse.debug.ui bundle was already activated by some previous action in the workbench such as editing a launch configuration, or expanding the Run As... menus.

Eclipse pydev: automatically save file when running program

It used to be that when I made changes to my .py file in Eclipse, then the changes would be automatically saved when I then ran the program in debug mode. I liked this since it meant that what it was debugging was the same as what I was looking at. Now it no longer does that, which means that's it's actually running an old version, unless I manually save the file first. The first time I ran the program, Eclipse asked me whether I always wanted any changes to be saved when the program was run, and I answered yes. I don't know why it doesn't do it anymore or how to get it back.
This seems to have happened after I started using Mercurial TortoiseHg with BitBucket. As part of that, I did move some files around, but everything is back and named the same as before.
Of course, I can just do change, save, run, but I'd rather not have to remember the extra save step.
Edit: Actually it's a bigger problem. It also shifts my breakpoints. In regular edit mode, I 1) set a break point and Save. 2) Add a new line above the breakpoint. Everything looks fine. 3) Save. Now the first breakpoint shifts position.
From your description, it seems that you're always opening the file as an external file and not a file within your workspace (the fact that breakpoints don't get updated is the major clue here).
You can check if this is what happening from the title that's shown in Eclipse (if it's a full filesystem path and not relative path considering your workspace location, this is what's probably happening).
How are you opening the file you're running? Are you opening it from the PyDev package explorer or dragging from the filesystem? (also, it'd be interesting knowing which eclipse/pydev/tortoise versions are you using)
Look at your Preferences -> Run/Debug -> Launching, you probably have "Never" set for Save Required Dirty Editors before launching.

In Eclipse, is there a way to open a file by typing its path and name?

IDEs are wonderful for many things. But I dislike how they make me use a GUI for something I can do faster typing in a command line. For example, opening a known specific file. If I know the name of a file, from the command line I can just type the name of my editor and the filename. With tab-completion I can accomplish this very quickly in a reliable amount of time. No searching through output or moving my fingers off the keyboard.
Is there a way in Eclipse to open a known file simply by typing its path+filename? Maybe through a plugin?
The "Open Resource" shortcut (ctrl-shift-R) is almost it, but it only lets you type the name of the file, not the path. If you have several files of the same name in different directories, you must again hunt with the mouse for what you want.
Actually, if you are using Helios (Eclipse 3.6) you can use paths; for details, see "New features in Open Resource dialog" in that version's "New and Noteworthy" page.
Also, you can Tab to the list of results and use the arrows to pick the right one.
Well, there's the general File>Open option which is meant for opening arbitrary, but I don't know what that does if you point it to a file inside your workspace. This opens your normal platform open dialog which you might be more comfortable using quickly.
I think Open Resource is the closest you're going to get. You shouldn't have more than a couple of files with the same name, I would think, plus you can use wildcards to open files quickly. Also, remember that files you open more recently appear higher up the list of matches so you may find that the file you want is at/near the top of the list already.
In the "Open File" dialog, if you just start typing or paste from clipboard by Ctrl+V, the desired file will be selected.
The dialog before typing something:
The dialog after pasting the file location:
I'm using Neon.3 Release (4.6.3).