Skip to main content

Questions tagged [matchlist]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer

Return last match of matchstr within single line

I have a little class/function detector in my .vimrc displaying, in my statusline, the python class/function my cursor currently is inside of. I am currently trying to adapt it for C++ source files, ...
Feffe's user avatar
  • 1,771
1 vote
2 answers

Why does matchlist() return empty strings at the end of the result?

From the Vim's help: echo matchlist('acd', '\v(a)?(b)?(c)?(.*)') Results in: ['acd', 'a', '', 'c', 'd', '', '', '', '', ''] I understand why the 3rd element is an empty string: 'b' is not present in ...
Konstantin Glukhov's user avatar
0 votes
1 answer

How to express an unicode code points set in match command?

My test.txt for this example.   unicode 3000 (whitespace in Chinese mark) ! unicode ff01 ^ unicode ff3e ~ unicode ff5e The command can match whitespace in Chinese mark(u3000). hi! ...
showkey's user avatar
  • 1,150
2 votes
1 answer

How to anchor matchlist after searchpos?

I'm trying to find words before the cursor using searchpos, then use matchlist to get the captures. I can't find a reliable way to anchor the pattern for matchlist. For example, if the cursor is ...
Mass's user avatar
  • 14.2k