Suppose you want to delete a C function from its name up to and including the line with the closing curly:
int main (void) /* Cursor on this line. */
{
while (...) {
...
}
}
I have tried d/^}<CR> but this does not delete the line with the closing curly. How can I have an inclusive find pattern delete? I must be missing something simple.
Edit You can assume the function’s closing curly is at the start of a line and other curlies are never.
I just did a quick search and found the offset syntax of the
/operator here.did the trick for me. It means “find the matching pattern, then select to the end of the 0th line after it” (i.e. the end of the line it is found on)