10 years ago
Using semicolon ";" instead of a colon ":" saves having to press "Shift" key many times throughout the editing process. Original semicolon mapping is to replicate last f
or t
command, so it's a trade off you must be willing to make.
nnoremap ; :
Rom Grk 8 years ago
This is my obsessive version:
If the last key was an f
/t
movement, repeats it.
If next key is w
, does an immediate :write
.
Otherwise, replay the keys as if nothing had happened.
(And display an ':' in the command-line to hide the lag.)
nmap <expr> ; CmdJump()
let g:quickmap = {
\ 'w': ":w\<CR>",
...
\}
function! CmdJump ()
if sneak#is_sneaking()
return ":call sneak#rpt('', 0)\<CR>"
end
echo ':'
let c = getchar()
let c = (c =~ '^\d\+$') ? nr2char(c) : c
return get(g:quickmap, char, ':' . char)
endfu
Kazark 10 years ago
Excellent! Yet another person doing this! I strongly believe in this.