nvui icon indicating copy to clipboard operation
nvui copied to clipboard

Custom shortcuts

Open hinell opened this issue 1 year ago • 0 comments

Xterm allows you to specify custom keybindings for certain sequences (e.g. <C-S-BS>) via ~/.Xresources files.

For nvui, it's currently impossible to do the same so it makes sense to make feature configurable via ~/.config/nvim/ginit.vim.

The proposed API may look like: GuiKeybinding <keysequence> <string-to-emit>. The actual use of config may look like:

if exists(':GuiTabline')
    GuiKeybinding Ctrl+Shift+BackSpace "\E[27;6;8~"
endif

In nvim

In nvim I catch them like this:

-- ~/.config/nvim/lua/keybindings.lua
... 
nvim.keymap.set({ 'i' }, 'E[27;6;8~', ... )

hinell avatar Feb 11 '23 08:02 hinell