Yank Line-text

- Add a user command: ':YankLine'
- Add a keymap: 'yo'
- Yanks the line excluding any leading whitespace
This commit is contained in:
2024-07-20 12:12:23 -04:00
parent 02bc1c9d54
commit 01170a0866
2 changed files with 11 additions and 0 deletions
+6
View File
@@ -9,6 +9,12 @@ vim.api.nvim_create_user_command("Q", function()
vim.cmd.qall()
end, { force = true })
-- Yank line without leading/trailing whitespace
vim.api.nvim_create_user_command("YankLine", function()
-- Yank line without leading/trailing whitespace
vim.api.nvim_feedkeys("_v$hy$", "n", true)
end, { force = true, desc = "Yank line without leading whitespace" })
-- Restore Colorscheme
vim.api.nvim_create_user_command("RestoreColorscheme", function()
vim.cmd.colorscheme(
+5
View File
@@ -206,6 +206,11 @@ wk.add({
end,
desc = "Substitute",
},
{
"yo",
"<cmd>YankLine<cr>",
desc = "Yank Line-text",
},
})
-- ---------------------------- Spell Correction -------------------------------