kutsan / zsh-system-clipboard

System clipboard key bindings for Zsh Line Editor with vi mode. It is similar to what `set clipboard=unnamed` does for vim.
GNU General Public License v3.0
149 stars 16 forks source link

What do you think about an environmental variable that will disable default keymappings? #23

Closed doronbehar closed 5 years ago

doronbehar commented 5 years ago

Hey @kutsan ,

I was thinking about enabling users define bindings to our widgets manually if they wish, by stating that the plugin will read an environmental variable say ZSH_SYSTEM_CLIPBOARD_DISABLE_DEFAULT_MAPS.

This would enable a user to define it's own bindings to our widgets - and thus potentially make the behaviour of the line editor even more similar to Vim's. In Vim, (by default) you are required to use the registers * or + for the x clipboard, unless you :set clipboard=unnamed.

TBH, I need this feature my self, because actually, I don't want every line edit operation to edit my system's clipboard. Anyway, I'll send a patch shortly, including README updated with the details and usage example.

kutsan commented 5 years ago

Looks good to me. You can even send to master directly, I trust your code.