copy
This commit is contained in:
parent
c6d975064d
commit
5af53df5ce
3 changed files with 22 additions and 1 deletions
1
bashrc
1
bashrc
|
|
@ -25,4 +25,3 @@ eval "$(~/.rbenv/bin/rbenv init - bash)"
|
|||
alias vim=nvim
|
||||
export EDITOR=nvim
|
||||
export TERM='xterm-256color'
|
||||
|
||||
|
|
|
|||
20
init.lua
20
init.lua
|
|
@ -70,6 +70,7 @@ require("lazy").setup({
|
|||
opts = {},
|
||||
},
|
||||
"nvim-lualine/lualine.nvim",
|
||||
"ojroques/nvim-osc52",
|
||||
})
|
||||
|
||||
require("fidget").setup({})
|
||||
|
|
@ -261,3 +262,22 @@ require("scrollbar").setup()
|
|||
|
||||
-- Status line
|
||||
require("lualine").setup()
|
||||
|
||||
-- OSC52 copy
|
||||
local function copy(lines, _)
|
||||
require("osc52").copy(table.concat(lines, "\n"))
|
||||
end
|
||||
|
||||
local function paste()
|
||||
return { vim.fn.split(vim.fn.getreg(""), "\n"), vim.fn.getregtype("") }
|
||||
end
|
||||
|
||||
vim.g.clipboard = {
|
||||
name = "osc52",
|
||||
copy = { ["+"] = copy, ["*"] = copy },
|
||||
paste = { ["+"] = paste, ["*"] = paste },
|
||||
}
|
||||
|
||||
-- Now the '+' register will copy to system clipboard using OSC52
|
||||
vim.keymap.set("n", "<leader>c", '"+y')
|
||||
vim.keymap.set("n", "<leader>cc", '"+yy')
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
set -g mouse on
|
||||
|
||||
set -g set-clipboard on
|
||||
|
||||
# List of plugins
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
|
|
|
|||
Loading…
Reference in a new issue