Skip to content

Instantly share code, notes, and snippets.

@saihoooooooo
Created February 6, 2012 04:08
Show Gist options
  • Save saihoooooooo/1749524 to your computer and use it in GitHub Desktop.
Save saihoooooooo/1749524 to your computer and use it in GitHub Desktop.
search operator by vim-operator-user
map x/ <Plug>(operator-search)
call operator#user#define('search', 'OperatorSearch')
function! OperatorSearch(motion_wise)
if a:motion_wise == 'char'
execute 'silent normal! `[v`]"zy'
call search(@z)
let @/ = @z
set hlsearch
endif
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment