开发者

vim formatting command

开发者 https://www.devze.com 2022-12-13 13:45 出处:网络
Today unintentionally I typed something when the cursor was on verylong line and this formatted my line, by braking it several lines of limited length. This line looks something like:

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

精彩评论

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