3

Is it possible to comment out one element of a multiline list? Or, in general, can you combine line continuations with comments?

(Lightly modified from my vimrc)

[
    \'eslint',
    \'tsserver',
    \'xo'
\]

1 Answer 1

4

Or, in general, can you combine line continuations with comments?

Yes, but it must consist of three symbols (see :h line-continuation-comment): quote, backslash and space.

As it stands in your example code right now, it won't work.

The following will work:

[
    "\ 'eslint',
    \'tsserver',
    \'xo'
\]
1
  • 1
    Honestly, I'm not sure why I didn't notice that while scrolling down. Thanks. At the very least, this should be easily searchable now.
    – 0az
    Mar 19, 2020 at 6:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.