1
0
Fork 0
dotfiles/home/config/nvim/plugins/osc52.fnl

15 lines
385 B
Text
Raw Normal View History

2022-08-02 20:50:56 +00:00
(let [osc52 (require :osc52)]
(fn copy [lines _]
(-> lines
(table.concat "\n")
(osc52.copy)))
(fn paste []
[(vim.fn.split (vim.fn.getreg "") "\n") (vim.fn.getregtype "")])
(set vim.g.clipboard {:name :osc52
:copy {:+ copy :* copy}
:paste {:+ paste :* paste}})
(vim.opt.clipboard:prepend :unnamedplus))