As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [pattern]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer

Specifying filetype in ModeChanged event autocmd

I'm using stylua as the code formatter for lua files. I do not usually get used to its formatting style but sometimes I do need a little help with it, so I decided to make it the formatprg during the ...
Futarimiti's user avatar
1 vote
1 answer

How to escape commas in au patterns and comma separated lists?

How do you specify a comma literal in the kinds of comma separated lists that are ubiquitous in vim configuration? The first example I can think of off the top of my head is in autocmds: au! BufRead,...
theonlygusti's user avatar
  • 2,083
3 votes
2 answers

What is the pattern matched against for events CmdwinLeave and CmdwinEnter?

More in general I'm always in doubt about what's the meaning of the {aupat} argument of autocmd for a given {event}. From :help :autocmd I read (my emphasis) Add {cmd} to the list of commands that ...
Enlico's user avatar
  • 2,054
1 vote
1 answer

What pattern should I use for word-like movement?

Given a line of text like the following let FindTargetsByRegexp = { re -> {lnums -> s:_FindTargetsByRegexp(re, lnums) }} I want the expression \(\n\|[^A-Za-z]\)\zs\S to stop on the same word ...
Wumbo's user avatar
  • 147
1 vote
1 answer

Can you get a count on a search where the count is > 1000 matches?

I have a file listing all the books I have read since 2013. I told someone I read x books a week and they didn't believe me so I started doing it :) The data looks like this. The last column is the ...
Steve's user avatar
  • 278
4 votes
1 answer

"wildignore" and "\{n,m}" type patterns

The :help entry for "wildignore" directs me to the following list of file patterns under *autocmd-patterns*: The pattern is interpreted like mostly used in file names: * matches any ...
user38527's user avatar
2 votes
1 answer

Prevent jumping when pattern matching

Is there a way to prevent cursor to search forward when using the * or /? I just want to highlight the word I am on & others, but not move to forward nor backward.
ogirginc's user avatar
  • 295