-
Notifications
You must be signed in to change notification settings - Fork 58
Using the operator
Marco Hinz edited this page Dec 1, 2016
·
2 revisions
The operator is not mapped by default. Set it like this:
nmap gs <plug>(GrepperOperator)
xmap gs <plug>(GrepperOperator)
This maps the operator for normal and visual mode.
In normal mode, the operator gs takes any motion and uses that selection to populate the search prompt. The query is quoted automatically.
Useful examples are gsW
, gsiw
, or gsi"
.
In visual mode, it uses the current selection.
References:
:h grepper-operator
:h operator
:h {motion}
:h text-objects