vim match-up: even better % :facepunch: navigate and highlight matching words :facepunch: modern matchit and matchparen. Supports both vim and neovim + tree-sitter.
Hello, thank you for this plugin!
I installed your plugin recently, and wanted to add my own support for R, and in particular, for [[...]].
In the R language, one has the [[ (extraction) operator, and the [ (subset) operator.
As there is no support for the R filetype, I proceeded to add my own ftplugin:
" ~/.vim/after/ftplugin/r/match.vim
let b:match_words .= '\V[[:]]'
As there is already vim's built-in support for [ by default, I only needed to add support for [[.
However, some parts of [[ are confused with a single [.
In addition, when the [['s and ['s are nested together, the double and single brackets are not matched properly.
Here's a minimal example:
[abc] # ok
[[abc]] # the second '[' should be part of '[[', instead of a single '['. Similarly for the last ']'.
x[a[b]] # the first ']' does not have a matching '['
x[a[[b]]] # the second ']' does not have a matching '['.
x[[a[b]]] # first and second '['s wrongly matched with first and second ']'s
x[[a[[b]]]] # first and second '['s wrongly matched with second and third ']'s
I also tried to use the priority of b:match_words, by preferring to match [[ over [. That is,
" ~/.vim/after/ftplugin/r/match.vim
let b:match_words .= '\V[[:]],[:]'
set matchpairs-=[:]
Hello, thank you for this plugin! I installed your plugin recently, and wanted to add my own support for R, and in particular, for
[[...]]
.In the R language, one has the
[[
(extraction) operator, and the[
(subset) operator. As there is no support for the R filetype, I proceeded to add my own ftplugin:As there is already vim's built-in support for
[
by default, I only needed to add support for[[
.However, some parts of
[[
are confused with a single[
. In addition, when the[[
's and[
's are nested together, the double and single brackets are not matched properly.Here's a minimal example:
I also tried to use the priority of
b:match_words
, by preferring to match[[
over[
. That is,but the result was the same.