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
|
|
@ -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`.
|
* **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.
|
* **Custom Dashboard:** A branded startup screen via `dashboard-nvim` with quick-access shortcuts to your most common actions.
|
||||||
|
|
||||||
|
cdcscdscsd
|
||||||
|
|
||||||
## Essential Keybindings
|
## Essential Keybindings
|
||||||
|
|
||||||
The **Leader Key** is set to `Space`.
|
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 Yank** | `y` | Copy selected text (Visual mode) *inside* Neovim only. |
|
||||||
| **Internal Paste** | `p` | Paste text (Normal mode) last copied/deleted *inside* Neovim. |
|
| **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 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.
|
**Note:** Dashboard keybindings are active only on the dashboard screen and do not require the leader key prefix.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,10 @@ vim.g.mapleader = " "
|
||||||
vim.keymap.set("n", "<leader>;", ":Dashboard<CR>", { desc = "Return to Dashboard", silent = true })
|
vim.keymap.set("n", "<leader>;", ":Dashboard<CR>", { desc = "Return to Dashboard", silent = true })
|
||||||
-- Copy visual selection to system clipboard using Leader + y
|
-- Copy visual selection to system clipboard using Leader + y
|
||||||
vim.keymap.set("v", "<leader>y", '"+y', { desc = "Copy to system clipboard" })
|
vim.keymap.set("v", "<leader>y", '"+y', { desc = "Copy to system clipboard" })
|
||||||
-- Paste from system clipboard using Leader + p
|
-- Paste from system clipboard AFTER the cursor (Normal & Visual mode)
|
||||||
vim.keymap.set("n", "<leader>p", '"+p', { desc = "Paste from system clipboard" })
|
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", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = "netrw",
|
pattern = "netrw",
|
||||||
callback = function(event)
|
callback = function(event)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue