Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong indent on subsequent wrapped lines in Sublime Text 2 #131

Open
tad-lispy opened this issue Apr 6, 2013 · 3 comments
Open

Wrong indent on subsequent wrapped lines in Sublime Text 2 #131

tad-lispy opened this issue Apr 6, 2013 · 3 comments

Comments

@tad-lispy
Copy link

Hello!

In ST2 subsequent lines of wrapped prose as well as code are indented more then first line when indent_subsequent_lines is set to true. If it's set to false, they are indented by "one tab". It doesn't matter if indentation is set to tabs or spaces. Take a look:

false_indent_subsequent_lines

true_indent_subsequent_lines

@jashkenas
Copy link
Owner

Yes -- I noticed this as well. How do we fix it?

@tad-lispy
Copy link
Author

It seems they are always indented one extra level. If you change indentation size, subsequent lines will be pushed to the right by that size.

After some research I see it's a more general ST2 problem. Many syntaxes are affected, among them Coffescript syntax from @Xavura as well as your's literate and "illiterate". So are most "code" syntaxes (C, Python, YAML etc.). The ones that work as expected are XML, HTML, plain text and literate haskell. The last one is interesting, because "illiterate" haskel doesn't work.

So I guess there must be some setting for this that must be explicitly set.

@tad-lispy
Copy link
Author

I've just noticed that wrapped comments are indented correctly. Take a look at line 21 with and without comment.

comment

no-comment

tad-lispy added a commit to tad-lispy/coffee-script-tmbundle that referenced this issue Apr 8, 2013
It seems Sublime Text 2 have a habit of pushing subsequent lines of wrapped **code** one indentation level to the right. It does not do this with **text** (as opposed to code). Whether scope is considered code or text depends on `scopeName` property. If it starts with `source.` - then it's code. If it starts with `text.` - then it's text. Probably it would be better to make prose text and code - code, but I don't know how to.

I think this change makes sense in a way. In literate programming we focus on prose. So it's more text then source... Kinda :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants