I\'ve been trying Vim for any text editing work for almost a week now. I want to know the fastest way to select a C function definition.
For example, if I have a fun
To delete an entire function, including its definition, such as:
function tick() {
// ...
}
f{ should do it, or simply $.V%d (Visual line, move to matching pair, delete)If your functions look like this:
function tick()
{
// ...
}
J (join the current line with line bellow. This also puts your cursor at the last character on the resulting line, {, just the one we need for the next command.)V%d (Visual line, move to matching pair, delete.)or
V[Down]%d (Visual line, move one line down, move to matching pair, delete.)