Using Vim as an HTML editor

后端 未结 5 539
你的背包
你的背包 2021-02-01 15:43

You know how Notepad++ has this feature that when you click on a tag (say ) it automatically highlights the ending tag () as well? What\'s it called? And how do you tweak Vim to

5条回答
  •  一生所求
    2021-02-01 16:33

    In Fedora 15 matchit.vim comes in the vim-common package. Then add this to your ~/.vimrc to get it working.

    source /usr/share/vim/vim73/macros/matchit.vim

    Then just press Shift+5 (aka % ) to jump to the matching tag.

    When editing an html file without the .html suffix, use the command:

    :set filetype=html

    to activate the matchit macro.

提交回复
热议问题