Question

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.

Was it helpful?

Solution

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.

enter image description here

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:

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top