Show only one indent guide in hanging indent. #11

Closed
tomekwi opened this Issue May 14, 2014 · 5 comments

Projects

None yet

2 participants

@tomekwi
tomekwi commented May 14, 2014

This is a feature suggestion.

A picture is worth a thousand words. What we have at the moment:
image

Looks prettier:
image

We could detect whether the next line is a hanging indent by checking the number of indent tabs compared to the previous line. If the difference is more than +1 tab, this is a hanging indent – we can show only one guide.

@tomekwi tomekwi changed the title from Show only one extra indent guide in hanging indent. to Show only one indent guide in hanging indent. May 14, 2014
@lkcampbell lkcampbell self-assigned this May 15, 2014
@lkcampbell
Owner

I can investigate making it an extension preference.

@tomekwi
tomekwi commented May 15, 2014

Thank you very much :)

@lkcampbell
Owner

@tomekwi, I played with this a bit this week. I haven't been able to figure out how to grab the previous line indentation from within the CodeMirror overlay tokenizer. It doesn't have a good way to grab information outside of the context of the current line it is parsing. I posted a question on it at:

https://groups.google.com/forum/#!topic/codemirror/tqukojpq_8g

Let's see what they say.

@lkcampbell
Owner

@tomekwi, I am closing this issue as a code challenge. It is a new issue category I created for issues and enhancements that I have unsuccessfully attempted to solve.

What this means is I am stuck and I am asking for help from the community. A link to this issue will go into the extension README.md file so that others can find it and offer ideas and solutions as well. I think this is a better solution than just leaving the issue open forever or closing it as wont fix.

If, at any point in the future, a good solution emerges, I will reopen and add this enhancement.

@lkcampbell lkcampbell closed this Oct 3, 2014
@tomekwi
tomekwi commented Oct 3, 2014

Thanks for taking your time, anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment