How can I break long lines when writing c++ code in vim? For example, if I have something like
56 fprintf(stderr, "Syntax error reading recursion value on
57 line %d in file %s\n", line_count, filename);
I get the following compile errors:
:56:25: warning: missing terminating " character
:56: error: missing terminating " character
:57: error: stray ‘\’ in program
:57:37: warning: missing terminating " character
:57: error: missing terminating " character
I’m a vim newbie.
Thanks!
Like Billy ONeal, I’m a bit confused why you’re asking this as a Vim question. The code you need to write is:
Note that there’s no comma – when you remove the extra whitespace, that’s just two string literals together. They’ll be combined into one, which I believe is exactly what you want.