Created
September 6, 2014 17:50
-
-
Save hlissner/3de525e280f26df0bbee to your computer and use it in GitHub Desktop.
Using . to repeat last f/F/t/T match in vim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" I remap the leader/localleader, and ; to alias :, but what if I like , and ;? | |
let mapleader = ',' | |
noremap ; : | |
" Makes f, F, t and T repeat the search. Support repeating with . | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment