vimtricks.wiki Concise Vim tricks, one at a time.

How do I jump to any visible word with EasyMotion?

Answer

<leader><leader>w

Explanation

vim-easymotion lets you jump to any visible position by highlighting targets with unique letters. It eliminates the need for counting with 3w or 5j.

How it works

  • <leader><leader>w highlights the start of every word
  • Type the letter shown on the target word to jump there
  • <leader><leader>f{char} highlights occurrences of a character
  • Two-keystroke navigation to any visible position

Example

Press <leader><leader>w and each word start gets a letter overlay:

[a]he [b]uick [c]rown [d]ox [e]umps [f]ver [g]he [h]azy [i]og

Type d to jump to fox.

Tips

  • Install: Plug 'easymotion/vim-easymotion'
  • <leader><leader>s{char} searches for a character in both directions
  • <leader><leader>j labels all lines below
  • Can be configured to use fewer keys for common jumps
  • Alternatives: vim-sneak, hop.nvim (Neovim)

Next

How do you yank a single word into a named register?