0

eg. if I have

{ foo: "bar",
     fu: {"baz": bar}
}

And I have my cursor on the last brace, is there a command that will goto the first brace? Also open to more general packages if there is one that does this better.

1

C-m-b (bound to backward-sexp) should go to the matching brace at the same level. There are many other useful code navigation commands too: C-m-f (bound to forward-sexp) and C-m-u which goes up in the code structure. In combination, these commands are very powerful tools for all sorts of code investigation, as well as editing. And they are available in just about every programming language mode.

See Editing Programs in the Emacs manual for much more on this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.