akiyosi / goneovim

A GUI frontend for neovim.
MIT License
2.36k stars 59 forks source link

how to mapping `Command-C/Command-V` #454

Open liaohui5 opened 1 year ago

liaohui5 commented 1 year ago

I try to bind hotkeys in lua scripts, but in telescopePrompt it's not working

# load lua scripts when goneovim start
Ginitvim = '''
lua << EOF
vim.g.isGoNeovim = 1
require("goneovim")
EOF
'''
-- goneovim.lua

local keymap = vim.api.nvim_set_keymap
local option = { noremap = true, silent = true }
keymap("v", "<D-c>", [["+y]], option) -- Copy
keymap("n", "<D-v>", [["+gP]], option) -- Paste in normal mode
keymap("v", "<D-v>", [["+P]], option) -- Paste in visual mode
keymap("i", "<D-v>", [[<ESC>"+pA]], option) -- Paste in insert mode
akiyosi commented 1 year ago

Hi, The following worked fine on my machine.

liaohui5 commented 1 year ago

Sorry, I may not have made it clear. in buffer content area is working, but in TelescopePrompt it's not working, so, if you want to reproduce it, you have to install telescope.nvim plugin.

  1. :Telescope find_files open TelescopePrompt
  2. Command-V: is not working