Skip to content

Config line breaks - #6603

Merged
kovidgoyal merged 6 commits into
kovidgoyal:masterfrom
jake-stewart:config-line-breaks
Sep 3, 2023
Merged

kovidgoyal merged 6 commits into
kovidgoyal:masterfrom
jake-stewart:config-line-breaks

Conversation

@jake-stewart

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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