I am looking for an emacs shortcut/command to jump out of an c/c++ block. E.g.
int func(int a, int b)
{
if (a == b) {
cout << "Equal" << endl; // <-- I am here
}
// <-- I want to get here
}
I want to use this keyboard shortcut in combination with yasnippet in order to jump out of the block after the if-statement. Ideally the move command would jump over pairs of braces and would ignore braces in comments.
I found C-M e which jumps out of the function, but I would only like to jump out of the block.
Have you tried M-x up-list, it also has an analog, M-x backward-up-list. I don't believe either have default bindings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With