Vim: z as leader
I've been considering using the 'z' as my leader key, mostly due to its privileged position in the keyboard layout. I know it is already used as some kind of leader (like g, for example) and I inspected all shortcuts assigned to it, and it seems that at least 90% of it has to do with folding, which I never use, so yeah, I definitely want z to be my leader key!
let mapleader="z"
So suppose I want 'zz' to be my 'Undo' shortcut:
nnoremap <Leader>z u
I close and relaunch Vim, to make sure the new binding is enforced.
Well, it doesn't work. Whenever I try it, I get this error:
E490: No fold found
But I just reassigned it!
And ':help z' tells me this:
|zz| zz redraw, cursor line at center of window
I just reassigned it to 'Undo' and its default binding is 'redraw window.' Neither has anything to do with folding. Why is Vim still complaining about folding when I press 'zz'?
:-(
|