本文介绍了vim c ++ break line的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在vim中编写c ++代码时如何打破长行?例如,如果我有类似
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);
我得到以下编译错误:
: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
我是vim新手。
谢谢!
推荐答案
像Billy ONeal,我有点困惑为什么你问这个Vim问题。您需要编写的代码是:
Like Billy ONeal, I'm a bit confused why you're asking this as a Vim question. The code you need to write is:
fprintf(stderr, "Syntax error reading recursion value on "
"line %d in file %s\n", line_count, filename);
请注意,当删除多余的空格时,只有两个字符串文字。他们将被合并成一个,我相信这是你想要的。
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.
这篇关于vim c ++ break line的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!