Add Keybindings, reading from yank register

This commit is contained in:
Yannick Reiß 2024-02-18 11:36:37 +01:00
parent c784a74fe3
commit 617fbea06b
No known key found for this signature in database
GPG Key ID: 5A3AF456F0A0338C
2 changed files with 5 additions and 2 deletions

View File

@ -1,9 +1,9 @@
local M = {} local M = {}
function M.lookup() function M.lookup()
local keywords = vim.fn.getreg("") local keywords = vim.fn.getreg("*")
print("Hallo Welt! " .. keywords) print(keywords)
end end
return M return M

View File

@ -12,3 +12,6 @@ let g:loaded_sourcer = 1
" Exposes the plugin's functions for use as commands in Neovim. " Exposes the plugin's functions for use as commands in Neovim.
command! -nargs=0 Lookup lua require("sourcer").lookup() command! -nargs=0 Lookup lua require("sourcer").lookup()
" Bind to keys fo in normal mode
nnoremap fo :Lookup<CR>