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.
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityeg. 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.
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.