diff --git a/init.lua b/init.lua index f885f6ce..7de09f64 100644 --- a/init.lua +++ b/init.lua @@ -143,6 +143,10 @@ vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagn vim.keymap.set('n', 'e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' }) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) +vim.keymap.set('n', 'yp', function() + vim.fn.setreg('+', vim.fn.expand '%') +end, { noremap = true, silent = true }) + -- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier -- for people to discover. Otherwise, you normally need to press , which -- is not what someone will guess without a bit more experience.