开发者

vim formatting command

Today unintentionally I typed something when the cursor was on very long line and this formatted my line, by braking it several lines of limited length. This line looks something like:

Foo("This is very long line (left '%s' right '%s) and it will never never never end", pNode->left.c_str(), pNode->right.c_str());

before formatting and after line this:

Foo("This is very long line (left '%s' right '%s) and it "
    "will never never never end", pNode->left.c_str(), 开发者_开发百科
    pNode->right.c_str());

What I pressed?


Vgq (while having set tw=60) or

set wrap (maybe) ?


to Idigas: I don't think so - the quotes (") confuses me. Does vim know that there is a string on the line so it should add extra quotes?

I tryed it and my vim did not put extra quotes to formated lines.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜