Jump to content

Vim: Match vue tags

From FVue

Problem

In a .vue file I want the percent (%) key to match the closing tag when the cursor is on the opening tag.

Environment

  • vim-8.0

Solution

Install an additional plugin: leafoftree/vim-vue-plugin

Also I found an upgrade of Matchit: Matchup. With these three plugins I can jump to matching tags in a .vue file using the percent (%) key:


Journal

20200227

In this issue vim-vue writer advises this:

let g:matchup_matchpref = {}
let g:matchup_matchpref.vue = {'tagnameonly': 1}
let g:matchup_matchpref.html = {'tagnameonly': 1}

but doesn't help me.

<google uid="C01"></google>

Comments

{{#widget:DISQUS |id=fvue |uniqid=Vim: Match vue tags |url=https://fvue.nl/wiki/Vim:_Match_vue_tags }}