dimba
dimba

Reputation: 27631

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?

Upvotes: 1

Views: 349

Answers (2)

Lukas Cenovsky
Lukas Cenovsky

Reputation: 5670

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.

Upvotes: 0

Rook
Rook

Reputation: 62588

Vgq (while having set tw=60) or

set wrap (maybe) ?

Upvotes: 2

Related Questions