Skip to content

Config line breaks #6603

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

Merged
merged 6 commits into from
Sep 3, 2023
Merged

Conversation

jake-stewart
Copy link
Contributor

This pull requests adds the line break syntax proposed in #6600.

With these changes, lines beginning with a backslash will be joined with the line above. The leading whitespace and backslash are removed.

map ctrl+1 combine
    \ : send_text all \
    \ : set_colors ~/path/to/theme.conf

becomes

map ctrl+1 combine : send_text all \ : set_colors ~/path/to/theme.conf

No whitespace is added upon line joining which allows for word breaks.

map ctrl+1 send_
    \text all \

becomes

map ctrl+1 send_text all \

The changes affect both the python and go config parsers.
These changes pass all tests as well as some additional ones.

@kovidgoyal
Copy link
Owner

Please fix the failing test which is about pyhton code formatting and also add a line or two in docs/conf.rst documenting this syntax.

@jake-stewart
Copy link
Contributor Author

sorted @kovidgoyal

@kovidgoyal kovidgoyal merged commit 07d9b95 into kovidgoyal:master Sep 3, 2023
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.

2 participants