" g: is a command to run a vim command around a text object. " " For example, to do a substitution inside the current block, one can do: " " g:iBs/foo/bar/g noremap g: :set operatorfunc=do_command_aroundg@ function! s:do_command_around(str) abort let [_, lnum0, _, _] = getpos("'[") let [_, lnum1, _, _] = getpos("']") call feedkeys(printf(":silent! %d,%d ", lnum0, lnum1)) endfunction