lite-xl-plugins
lite-xl-plugins copied to clipboard
[Request] Settings: add duplicate keybindings warning
Right now you can create duplicate keybindings through the Settings GUI. This can lead to some problems, like when you remap line-wrapping:toggle to ctrl+w and now you can no longer close documents with Ctrl+W even though the hint still shows this:

I can think of a couple options:
- Add a dialog to notify of a keybinding conflict, and if the user chooses to save the new binding then it should clear the old binding.
- Don't show a dialog, but instead automatically clear the old binding when it is mapped to another command.
The thing is that lite-xl actually supports duplicated bindings for every command, what determines which command takes precedence after pressing a keybinding is the predicate associated to the command.
Maybe a warning could be displayed letting you know all the other commands where the same keybinding is assigned, but there will not be an easy way to determine if the predicate of the different commands conflict. As such it would not be correct to unassign a keybinding from other commands when assigning the same keybinding to a command.
The thing is that lite-xl actually supports duplicated bindings for every command...
I noticed after I binded ctrl+w to line wrapping, I was no longer able to close windows by pressing Ctrl+W.