Vim: Match vue tags

From FVue
Jump to: navigation, search

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.

Comments

blog comments powered by Disqus