This function

function! Gf()
  execute "normal \<Plug>(easymotion-s2)ab"
  echo "done"

just prints

EasyMotion: Cancelled

when called, but that's not what I want.

EasyMotion is a plugin for visually assisting with motions. Normally, <Plug>(easymotion-s2)ab searches for the occurrences of ab and shows hint keys at each location, then waits for user input. When the user enters some hint keys, the cursor jumps to that location and the command is finished. What I'm trying to do is run this command as normal, with the user input and jump, then print done at the end, not cancel it.

  • 1
    Looks like the user input doesn't consider input pending from a mapping. Open an issue and ask the plugin's author how to approach your use case. – Ingo Karkat Dec 15 '16 at 12:58
  • I'm confused, wouldn't execute "normal \<Plug>..." try to type <Plug>... in normal mode? That's not going to give you anything useful. – Tumbler41 Dec 15 '16 at 17:56
  • 1
    @Tumbler41 it's explained here stackoverflow.com/a/18547013/371334 – Andrew Dec 15 '16 at 19:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.