While writing this answer about vim-rails on SpaceVim, I found out these mappings set by SpaceVim, such as this one:
nnoremap gf gf
SpaceVim also creates similar mappings for all of the other gX
commands and all zX
commands as well.
Which made me wonder: Why would you need such mappings?
As far as I can tell, they don't actually do anything. They just map a key sequence to itself, so they'll simply have Vim execute the exact same command as if the mappings were not there. (Or am I wrong about that and there's a subtle difference when such a trivial mapping is actually installed?)
I suspect they have something to do with the leader guide for the g
(and z
) commands, but I still don't understand why they're needed.
Can someone familiar with SpaceVim (implementation) or with this particular code pattern please clarify?