- 
                Notifications
    You must be signed in to change notification settings 
- Fork 353
          Align behaviour of maps, cmap, nmap, vmap and cmd to Vim
          #2233
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| Any thoughts on this, @joelim-work? I never understood why there are separate commands instead of using the existing ones. | 
| I think the reason was simplicity, the fact that  So the question is what should  | 
| 
 I do recognise this. 
 Just because I am collaborator now, I don't want to shape  I don't like having 2 ways of doing the same thing either but I also don't want to introduce breaking changes again. If we removed these should these states even be queryable anymore? How would a  Maybe it's better to leave it as it is. Sadly, I don't see a way of overwriting built-in commands that still call the original one internally without having to type a different function name. If this was possible, I could just write my own command. | 
| I thought about the problem a bit more - the difference between Vim and  So now you have the situation where you are trying to extend a fixed built-in command ( I wonder if there is an alternate solution for this. You could define a keybinding for  | 
| Another, different idea I got which is rather off-topic: Create a new hook command  | 
| Such a hook command can only be used when entering a command to be executed. I guess it's possible a user might want to manipulate the command line while editing a command though, but it is also quite a niche use case. I think either of these solutions is more flexible and preferable than the current PR. The only downside is that it is not default behavior, but at this point I doubt there is a perfect solution that avoids making some kind of tradeoff. | 
In
Vim, when runningmap(and the others*) without any arguments, it shows a list of all the binds.In
lf, it incorrectly gets interpreted as the key\nwhich thenlftries to unmap.This PR fixes the incorrect interpretation and also calls the associated command to list the binds (i.e.
maps,vmaps, ...) when run without any arguments.*
cmddoesn't exist inVim