13 lines
295 B
Lua
13 lines
295 B
Lua
|
local function paste_buf()
|
||
|
local content = os.getenv("NVIM_CLIPBOARD")
|
||
|
|
||
|
local line = vim.api.nvim_get_current_line()
|
||
|
local indent = string.match(line, " +")
|
||
|
|
||
|
vim.fn.setreg("a", indent .. content)
|
||
|
vim.cmd("put a")
|
||
|
end
|
||
|
|
||
|
-- Use ';' to insert paste_buf
|
||
|
vim.keymap.set('n', ';', paste_buf)
|