How do I jump to the matching tag, when editing HTML in Emacs?

前端 未结 3 536
一生所求
一生所求 2021-01-31 15:57

Suppose I\'m editing a very long and messy HTML file. With my cursor at an open tag, is there a way to jump to its closing tag?

3条回答
  •  灰色年华
    2021-01-31 16:29

    Assuming you're using nxml-mode:

    C-M-n runs the command nxml-forward-element, which is an interactive
    compiled Lisp function in `nxml-mode.el'.
    
    It is bound to C-M-n.
    
    (nxml-forward-element &optional ARG)
    
    Move forward over one element.
    With ARG, do it that many times.
    Negative ARG means move backward.
    

提交回复
热议问题