I am wondering how to use one hotkey mapping two command in vim.
for exmpale, I already have those two mapping
map <silent> <F7> zM
map <silent> <F8> zR
But, I just want to use F8 to toggle between zM and zR.
Hoping anyone can give me solution.
Thanks a lot.
Won’t zA do what you wanted…?
If it won’t then we need to go deeper. http://www.vim.org/scripts/script.php?script_id=1494 tells you what to do, here’s the relevant script: