add copy and paste from system keyboard fuction
This commit is contained in:
parent
7dcec51e2d
commit
315b19a7a8
2 changed files with 8 additions and 3 deletions
|
|
@ -3,8 +3,10 @@ vim.g.mapleader = " "
|
|||
vim.keymap.set("n", "<leader>;", ":Dashboard<CR>", { desc = "Return to Dashboard", silent = true })
|
||||
-- Copy visual selection to system clipboard using Leader + y
|
||||
vim.keymap.set("v", "<leader>y", '"+y', { desc = "Copy to system clipboard" })
|
||||
-- Paste from system clipboard using Leader + p
|
||||
vim.keymap.set("n", "<leader>p", '"+p', { desc = "Paste from system clipboard" })
|
||||
-- Paste from system clipboard AFTER the cursor (Normal & Visual mode)
|
||||
vim.keymap.set({ "n", "v" }, "<leader>p", '"+p', { desc = "Paste from system clipboard after" })
|
||||
-- Paste from system clipboard BEFORE the cursor (Normal & Visual mode)
|
||||
vim.keymap.set({ "n", "v" }, "<leader>P", '"+P', { desc = "Paste from system clipboard before" })
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "netrw",
|
||||
callback = function(event)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue