Question

This is not an Eclipse-programming question, but rather a question about the Eclipse user-interface in general.

I am writing a verilog source-code in an Eclipse text-editor using the simplifIDE plug-in. I want to align my code so that variable names always start at offset 33 (32 spaces from the left margin)

Does Eclipse have an option for displaying the current cursor position in a status bar? I'd even be happy with a keyboard shortcut that would pop the current cursor-position up in an dialog.

In the absence of a solution, I'll set my tabs to 4-spaces, and put the following text at random places in my file:

//..5...9...13..17..21..25..29..33..37..41..45..49..53..57..61..65..69..73..77..81..

Was it helpful?

Solution

Using Eclipse 3.5 with the SimplifIDE plugin, I am seeing the correct information for the line and column on a status bar on the bottom of the screen with a {line : column} format using either tabs or spaces.

thedeserthorizon, Are you using 3.5 and the version 1.0.26 of Simplifide.

OTHER TIPS

Some editors (such as the built in Java editor) display the current insertion point location in the status bar. However, if you use a third-party editor sch as SimplifIDE, you may have to check its own configuration for that option.

If you write your own editor, you could ask the editor to give you the selection provider, as the selection provider can also provide the current insertion point location.

There is a new API in 3.5 which allows you to listen to cursor movements (see this bug). Then, you can ask for the index of the first character in the current line and subtract that from the absolute cursor position. This gives you the offset in characters.

This is not accurate though; if your editor supports real tabs, then you must query the editor for the current line and count characters yourself (where the tab counts as 2..8 character positions).

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