Eclipse and VIM are my favorite editors. For tasks that requires a lot of coding and especially for java Eclipse is the best, but it requires a lot of resources (CPU and RAM). When I have to modify just couple of lines, then VIM is the choice; I fix the code faster that Eclipse starts.
For both cases there are situations when you would like to see the lines number. Here is how I do it.
In VIM, having the editor open in command mode, just type :set number, or only :set nu.
Here is the result:
To revert it (make lines number not visible), just type :set no number, or :set nonu
To make the lines number visible in Eclipse, we have to play a little with the menu entries: Window->Preferences, a popup will open and then select in the tree General->>Editors->Text Editors and check the Show line numbers, just like bellow
And the result is something like this: