Skip to content

General support for joining lines with line continuation characters #114

@kiryph

Description

@kiryph

I miss support for the commonly found line continuation style with a trailing backslash when joining lines. For example in cmake:

message("\
This is the first line of a quoted argument. \
In fact it is the only line but since it is long \
the source code uses line continuation.\
")

I would like to have following behavior: when joining those lines, the backslashes are automatically removed.

Many languages use this style:

  • awk
  • c
  • c++
  • cmake
  • gnuplot
  • python
  • shell scripting languages (e.g. bash)

and most likely many more which I am however not familiar with.

I know this does not apply to all languages, e.g. Lua which uses \z:

The escape sequence '\z' skips the following span of white-space characters, including line breaks; it is particularly useful to break and indent a long literal string into multiple lines without adding the newlines and spaces into the string contents.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions