Skip to main content
adding more detail about matchpairs option
Source Link

From :help matchpairs is this...

Only character pairs are allowed that are  
different, thus you cannot
  jump between two  
double quotes.

... in other words, the syntax of matchpairs is "openchar:closechar", where openchar must not be the same as closechar.

these are valid pairs...

:set matchpairs=[:]
:set matchpairs={:}
:set matchpairs=(:)

but these are invalid, since the open and close characters are the same character...

:set matchpairs=':'
:set matchpairs=":"

... so, as you can see, matchpairs isn't your solution.

I do not know of a plugin that satisfies your need. Many plugins are smart enough to modify the text between single and double quotes (the surround plugin comes to mind), so you would think adding the ability to use '%' to move back and forth between the open quote and close quote would be quite doable. I don't have the skills to write a solution for you, nor have I found an existing plugin that solves this. Such a plugin may indeed exist, I just haven't found it yet.

I realize this isn't the answer you're looking for. But perhaps it steers you in the right direction.

From :help matchpairs is this...

Only character pairs are allowed that are different, thus you cannot
 jump between two double quotes.

... so, as you can see, matchpairs isn't your solution.

I do not know of a plugin that satisfies your need. Many plugins are smart enough to modify the text between single and double quotes (the surround plugin comes to mind), so you would think adding the ability to use '%' to move back and forth between the open quote and close quote would be quite doable. I don't have the skills to write a solution for you, nor have I found an existing plugin that solves this. Such a plugin may indeed exist, I just haven't found it yet.

I realize this isn't the answer you're looking for. But perhaps it steers you in the right direction.

From :help matchpairs is this...

Only character pairs are allowed that are  
different, thus you cannot jump between two  
double quotes.

... in other words, the syntax of matchpairs is "openchar:closechar", where openchar must not be the same as closechar.

these are valid pairs...

:set matchpairs=[:]
:set matchpairs={:}
:set matchpairs=(:)

but these are invalid, since the open and close characters are the same character...

:set matchpairs=':'
:set matchpairs=":"

... so, as you can see, matchpairs isn't your solution.

I do not know of a plugin that satisfies your need. Many plugins are smart enough to modify the text between single and double quotes (the surround plugin comes to mind), so you would think adding the ability to use '%' to move back and forth between the open quote and close quote would be quite doable. I don't have the skills to write a solution for you, nor have I found an existing plugin that solves this. Such a plugin may indeed exist, I just haven't found it yet.

I realize this isn't the answer you're looking for. But perhaps it steers you in the right direction.

Source Link

From :help matchpairs is this...

Only character pairs are allowed that are different, thus you cannot
jump between two double quotes.

... so, as you can see, matchpairs isn't your solution.

I do not know of a plugin that satisfies your need. Many plugins are smart enough to modify the text between single and double quotes (the surround plugin comes to mind), so you would think adding the ability to use '%' to move back and forth between the open quote and close quote would be quite doable. I don't have the skills to write a solution for you, nor have I found an existing plugin that solves this. Such a plugin may indeed exist, I just haven't found it yet.

I realize this isn't the answer you're looking for. But perhaps it steers you in the right direction.