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

Don't re-indent when inside a string #2

Open
y opened this issue Sep 4, 2012 · 0 comments
Open

Don't re-indent when inside a string #2

y opened this issue Sep 4, 2012 · 0 comments

Comments

@y
Copy link

y commented Sep 4, 2012

When on the 2nd line of the following example, hitting return to add a new line causes the line to get re-indented to the same indentation level as the first line.

quotation: "this is a multi-line string that can span many lines and
    shouldn't be re-indented when a new line is created"

The python indent file has logic which would guard against this:

" If the start of the line is in a string don't change the indent.
if has('syntax_items')
      \ && synIDattr(synID(a:lnum, 1, 1), "name") =~ "String$"
  return -1
endif
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

1 participant