Merge pull request 'add copy and paste from system keyboard fuction' (#3) from system-clipboard-copy- into main

Reviewed-on: #3
This commit is contained in:
Yasien Meth 2026-06-26 13:01:14 +02:00
commit bda1f54de9
2 changed files with 8 additions and 3 deletions

View file

@ -14,6 +14,8 @@ A pre-configured, performance-oriented Neovim setup designed to get you from zer
* **Git Integration:** Quick access to Git commands using `vim-fugitive`.
* **Custom Dashboard:** A branded startup screen via `dashboard-nvim` with quick-access shortcuts to your most common actions.
cdcscdscsd
## Essential Keybindings
The **Leader Key** is set to `Space`.
@ -36,7 +38,8 @@ The **Leader Key** is set to `Space`.
| **Internal Yank** | `y` | Copy selected text (Visual mode) *inside* Neovim only. |
| **Internal Paste** | `p` | Paste text (Normal mode) last copied/deleted *inside* Neovim. |
| **System Copy** | `<leader>y` |Copy selected text (Visual mode) to the **system clipboard**. |
| **System Paste** | `<leader>p` | Paste text (Normal mode) from the **system clipboard**. |
| **System Paste After** | `<leader>p` | Paste from **system clipboard** *after* cursor (Normal/Visual) |
| **System Paste Before** | `<leader>p` | Paste from **system clipboard** *before* cursor (Normal/Visual) |
**Note:** Dashboard keybindings are active only on the dashboard screen and do not require the leader key prefix.

View file

@ -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)