How can I scroll left and right in Eclipse editor with the keyboard without moving the cursor? - eclipse

To scroll within the Eclipse editor without moving the cursor up and down one can use CTRL+Down or CTRL+Up. But what about left and right?

It is not possible. If you search keys in Eclipse's Preferences, you will find out that you only have Scroll up and Scroll down that you can set hotkeys on.
My recommendation would be changing the maximum line length in the editor.
Make your code shorter. After all, looooong lines of code are not so readable.
Also, resize your editor area. If you feel strangled, remove the Outline, TaskList, and Build view from your right side of Eclipse, and enlarge the editor.

Related

Is there a shortcut to switch between panes in the Eclipse Compare view?

When I compare two versions of a source file (for example, from egit) in the Eclipse IDE, the Compare View is appeared. It has two panes containing two versions of a text and I can use keyboard to move cursor through the text on one of this panes (or even edit the text in it). Additionally, I can use special shortcuts to go to the next/previous difference and/or apply current change from/to the opposite pane. But, I didn't find a way to move the input focus to other pane.
Actually, I would like be able to do this in one case. Let's say, I compare two revisions of a source and I need to apply some changes while others are unneeded. To achieve this, I walk through changes using the Ctrl + , or . shortcuts and apply needed changes using, for example, the Ctrl + Shift + ,. It looks like all is OK, but if I reach a change which has no any text in the current pane, the applying shortcut does not work. For example, the cursor is on the left pane. I went to the next difference and this difference is concluded in that the text was, for example, added in this line. So, the Compare View will show this added text on the right pane, will highlight it with the special rectangle while this rectangle on the left pane will have zero height and the cursor will be placed under this zero-sized rectangle. I.e., outside of it. So, I think, exactly this thing causes that the current change applying does not work. When I click on the opposite pane, inside of this change and then use the change applying shortcut, it works fine. So, I would like to switch to other plane via shortcut, not using mouse.

Rearranging different views/windows in eclipse

I am wondering if it's possible to have a "panel"/view on both sides of my editor in eclipse?
For example, package explorer on the left, editor in the middle (that's the default arrangement) and then to add the debug view on the right. I don't want to split the editor horizontally or vertically but rather to have a whole new panel on the right for the debug.
yes, definitely you can,
first , you have to close whichever window is on the right side, except the editor and then drag the console to the right.I hope this is what you were looking for.

In Eclipse, a way to see code errors without moving the mouse?

I've programmed in Emacs for a while, and I'm starting to learn Java in Eclipse. I prefer not to have to take my hands off the keyboard in order to see errors that Eclipse marks in the code... so I'd rather not hover over them, (plus the red X on the left margin is annoyingly small and hard to target for a hover)... is there a way to get them to pop up simply by moving the cursor to that point?
The "Show Tooltip Description" command usually has the keybinding of F2. You can change it on the Keys preference page if you like.

How do you hide the sidebars in Eclipse so you can just see the code?

I'm new to Eclipse. One of the things I like most about it is the fantastic indexing, and the symbols/function outline at the right. One of the things I like least about it is how small the code area is due to all of the side-bars (one each in Eclipse CDT at the left, right, and bottom makes the code area quite small).
Is there a quick way to toggle between hiding and showing the sidebars?
After some tinkering around I accidentally discovered it! Just double-click on your open file-name tab and it will maximize to full-screen. Double-click again to toggle it back to your normal "perspective". This applies to the left, right, and bottom sidebars too: just double-click on any of their tabs and they will maximize. Do it again to toggle back to normal size.

Select lines in Eclipse by clicking in the margin

I'm using Eclipse CDT (Kepler) on Windows.
I'd like to select lines by clicking the mouse in the margins of the editor.
In many Windows editors (Visual Studio, Source Insight, Notepad++, Microsoft Word) if you move the mouse to the left margin of the editor, the mouse pointer (which usually points leftward) points rightward. If you click once, that selects the line; if you click and drag, it selects multiple lines.
Is there a way to configure Eclipse to behave the same way?
I find that in my left margin, the mouse pointer always points to the left. Clicking once has no effect. Click-dragging works only sometimes, which is infuriating.
There are 2 distinct left-margin areas in the Eclipse editors (at least some of the editors, including the Java editor), the overview ruler and the vertical ruler.
Click+drag line selecting has to be done in the vertical ruler area, not the overview ruler.
To select just one line, you can also triple-click anywhere on that line.
Update:
If you have Code Folding enabled, those indicators are shown in the vertical ruler when you hover the pointer over an area that can be folded. Looks like this: