-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
How can I break lines in vim? #342
Comments
Does also happen on master: Yes
|
You need to do Breaking up long strings is already an open issue: #182. |
@JelleZijlstra Indeed I've missed the |
@RidaAyed, the break you're suggesting doesn't do what you think. Since it's a backslash inside a string literal, all the other extra whitespace will be preserved as extra spaces inside the string. If you omit the extra spaces, the line will just wrong being dedented compared to the rest of the code. What you want is this: headers = {
"User-Agent": (
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 "
"(KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36"
),
} If you're question is about "how to invoke Black from Vim", then the answer to that is "with :Black or ,=". |
Thank you @ambv Lukasz. Yes, you're right, how can I get these lines breaked as you outlined? |
That's the issue I linked above; Black doesn't implement it yet. |
@JelleZijlstra, true, but if you format this yourself, Black will keep it. |
Closing this as a duplicate of #182. If there's anything more that's actionable here, please open a new issue. |
Howdy! Sorry you're having trouble. To expedite your experience,
provide some basics for me:
Operating system: Linux Arch
Python version: 3.6.65
Black version: Black, version 18.6b2 on Python 3.6.5 (default, May 11 2018, 04:00:52)
[GCC 8.1.0].
Does also happen on master: 🤔
To answer the last question, follow these steps:
pip install -e .
;python setup.py test
; andblack
like you did last time.How can I break lines in vim?
Hi
How can I break lines using
:Black
to format from this?to that:
P.S. Can't answer last question due to:
The text was updated successfully, but these errors were encountered: