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

Fixes #131. Change scope type to text. #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tad-lispy
Copy link

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 :)

EDIT: Sorry. I thought if I name my commit like that it will be attached to #131 . Can this be merged with it?

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 :)
@jashkenas
Copy link
Owner

Thanks for doing the research. Before I merge -- are you sure that this is the only way to get the desired non-indented behavior?

@tad-lispy
Copy link
Author

Honestly I am not. Everything I know about syntaxes in ST2 I've learned while trying to resolve this issue. I've red this document about syntax definitions. It seems to mainly address ST1, but some info is relevant to 2 as well. Since your last comment I've spent some extra time and found nothing new. Also I am not sure if there will be any side effects with this change. I've changed this in my setup and everything seems to work.

gregschlom added a commit to gregschlom/SublimeWiki that referenced this pull request Jun 4, 2014
Before this fix:

Lorem ipsum dolor sit amet, consectetur adipisici
    elit, sed do eiusmod tempor incididunt labore 
    et dolore magna aliqua. Ut enim ad minim veni, 
    quis nostrud exercitation ullamco laboris

After this fix:

Lorem ipsum dolor sit amet, consectetur adipisici
elit, sed do eiusmod tempor incididunt labore et 
dolore magna aliqua. Ut enim ad minim veni, quis 
nostrud exercitation ullamco laboris


More info here: jashkenas/coffee-script-tmbundle#132

"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."
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

Successfully merging this pull request may close these issues.

None yet

2 participants