Open vaklinzi opened 4 years ago
It seems that the search term is in Vim always put in single quotes, since
$FZF_DEFAULT_OPTS
containing --exact
or -x
only yields exact matches. That is why in my vimrc
I added
let $FZF_DEFAULT_OPTS=substitute($FZF_DEFAULT_OPTS, '\V--exact\|-x', '', 'g')
Regarding this exact issue,
let $FZF_DEFAULT_OPTS .= ' -x '
should achieve what you look for.
I tried with
'
'$user
but still there are some other results.
It's working as expected. It's only showing results that contain the exact $user
, not matching something like $someuser
or $ultracondenser
.
What you're looking for is a word-boundary anchor (\b
in regex), but fzf doesn't support it.
man fzf
)I would like to find exact matches for a searched word. For example if I search for
$user
I would like to find only these results but have others like$userData, $username...
:I tried with
'
'$user
but still there are some other results.