Bug 438753 - [painting] Draw vertical lines at indentation columns
Summary: [painting] Draw vertical lines at indentation columns
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.4   Edit
Hardware: All All
: P5 enhancement with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-02 12:18 EDT by Daniel Sokolowski CLA
Modified: 2015-11-30 18:42 EST (History)
3 users (show)

See Also:


Attachments
Indentation guides for Eclipse IDE (43.86 KB, image/png)
2014-07-02 12:18 EDT, Daniel Sokolowski CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Sokolowski CLA 2014-07-02 12:18:47 EDT
Created attachment 244741 [details]
Indentation guides for Eclipse IDE

One feature that Sublime editor (and others) does well is showing indentation guidelines regardless if one is using spaces or tabs. Currently I am mimicking this behaviour by using tabs and having the 'Show whitespace characters' selected.

However in the current team I am with 'spaces' are used for indentation.

If I set my Eclipse to use spaces for indentation this makes it hard to distinguish the 'column' I am in because of course spaces based indentation are now rendered as a line of '....' instead of a single '>>' characters. 

So I propose to implement smart guidelines as shown in the image or minimally allow to allow to display 4 spaces as a single tab character.  For better or worse, there also seems to be a trend towards spaces as indentation anyhow and Eclipse IDE could use good visual indentation display.
Comment 1 Dani Megert CLA 2014-07-08 17:01:17 EDT

*** This bug has been marked as a duplicate of bug 84878 ***
Comment 2 Daniel Sokolowski CLA 2014-07-09 21:06:13 EDT
This is not a duplicate, the bug 84878 is for language construct aware guidelines - this submission is displaying simple indentation guides based on your indentation settings.
Comment 3 Daniel Sokolowski CLA 2014-07-09 21:08:17 EDT
In a similar fashion as provided by http://atlanto.github.io/IndentGuide/ but built into to the editor.
Comment 4 Daniel Sokolowski CLA 2014-09-27 21:50:53 EDT
I've been using the mentioned plugin and it works rather well - perhaps it can be just merged in.
Comment 5 Dani Megert CLA 2014-10-02 08:16:20 EDT
(In reply to Daniel Sokolowski from comment #4)
> I've been using the mentioned plugin and it works rather well - perhaps it
> can be just merged in.

The link from comment 3 doesn't work for me.
Comment 6 Michal Niewrzal CLA 2015-11-26 07:12:45 EST
Old repository is not available anymore. There is working fork of this project: https://github.com/sschaef/IndentGuide
Comment 7 Timo Kinnunen CLA 2015-11-30 18:42:53 EST
A very simple workaround for some is to change the character representing tabs from 
the » character to 
the │ character. It's origin dates back to the MS-DOS era so 
the │ BOX DRAWINGS LIGHT VERTICAL (\u2502) character is widely supported. Also, 
the ┃ BOX DRAWINGS HEAVY VERTICAL (\u2503), 
the ┆ BOX DRAWINGS LIGHT TRIPLE DASH VERTICAL (\u2506), 
the ┇ BOX DRAWINGS HEAVY TRIPLE DASH VERTICAL (\u2507), 
the ┊ BOX DRAWINGS LIGHT QUADRUPLE DASH VERTICAL (\u250A), 
the ┋ BOX DRAWINGS HEAVY QUADRUPLE DASH VERTICAL (\u250B), 
the ╎ BOX DRAWINGS LIGHT DOUBLE DASH VERTICAL (\u254E), 
the ╏ BOX DRAWINGS HEAVY DOUBLE DASH VERTICAL (\u254F) and finally 
the ║ BOX DRAWINGS DOUBLE VERTICAL (\u2551) character could also be options.

The class which decides which characters are used to display whitespace is org.eclipse.jface.text.WhitespaceCharacterPainter.