Repeat f/F/t/T in vim with .
If you're like me, you've done:
let mapleader = ','
noremap ; :
But it robs you of ;
and ,
's native function, which is to navigate matches for f/F/t/T, like n and N do for /
and ?
searches.
This is the workaround I use, which requires vim-repeat:
nnoremap <Plug>NextMatch ;
nnoremap <silent> f :<C-u>call repeat#set("\<lt>Plug>NextMatch")<CR>f
nnoremap <silent> F :<C-u>call repeat#set("\<lt>Plug>NextMatch")<CR>F
nnoremap <silent> t :<C-u>call repeat#set("\<lt>Plug>NextMatch")<CR>t
nnoremap <silent> T :<C-u>call repeat#set("\<lt>Plug>NextMatch")<CR>T
This allows you to repeat the last f/F/t/T with .
Written by Henrik Lissner
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Related Tags
#vim
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#