vim-easymotion icon indicating copy to clipboard operation
vim-easymotion copied to clipboard

:normal /pattern can't work

Open wiyr opened this issue 7 years ago • 0 comments

since i want to implement function like

function! VisualSearch(direction) range
    let l:saved_reg = @"
    execute "normal! vgvy"

    let l:pattern = escape(@", '\\/.*$^~[]')
    let l:pattern = substitute(l:pattern, "\n$", "", "")

    if a:direction == 'b'
        execute "normal ?" . l:pattern . "^M"
    elseif a:direction == 'gv'
        execute "vimgrep /" . l:pattern . "/" . " **/*"
    elseif a:direction == 'f'
        execute "normal /" . l:pattern . "^M"
    endif

    let @/ = l:pattern
    let @" = l:saved_reg
endfunction

command :normal /pattern always show EasyMotion Cancelled. I think function of chooing some word and search it is useful. How can i combine with EasyMotion

wiyr avatar Jan 24 '18 06:01 wiyr