jashkenas / coffee-script-tmbundle

A TextMate Bundle for CoffeeScript
MIT License
821 stars 234 forks source link

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

Open tad-lispy opened 11 years ago

tad-lispy commented 11 years ago

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 commented 11 years ago

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

tad-lispy commented 11 years ago

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 commented 11 years ago

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

comment

no-comment