add scripts for treewide mainProgram

This commit is contained in:
2023-11-27 02:36:30 +01:00
parent 64317ab657
commit 64ff01e6f0
4 changed files with 95 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
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)