Skip to content

Commit

Permalink
feat(nvim): Use OSC52 yank
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjones2014 committed Aug 13, 2024
1 parent a757d89 commit 5ac65a6
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions nvim/lua/my/settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,19 @@ vim.opt.laststatus = 3
vim.opt.virtualedit = 'onemore'
vim.opt.splitkeep = 'screen'
vim.opt.clipboard = 'unnamedplus'
-- TODO this does not work very well
-- Force use OSC52 escape for clipboard so it works over SSH
-- vim.g.clipboard = {
-- name = 'OSC 52',
-- copy = {
-- ['+'] = require('vim.ui.clipboard.osc52').copy('+'),
-- ['*'] = require('vim.ui.clipboard.osc52').copy('*'),
-- },
-- -- TODO this is slow as fuck for some reason, for now, just use Wezterm paste in insert mode
-- -- paste = {
-- -- ['+'] = require('vim.ui.clipboard.osc52').paste('+'),
-- -- ['*'] = require('vim.ui.clipboard.osc52').paste('*'),
-- -- },
-- }
vim.g.clipboard = {
name = 'OSC 52',
copy = {
['+'] = require('vim.ui.clipboard.osc52').copy('+'),
['*'] = require('vim.ui.clipboard.osc52').copy('*'),
},
-- TODO for some reason, you have to hit ctrl+c after
-- pasting for the text to actually appear, but it still works.
paste = {
['+'] = require('vim.ui.clipboard.osc52').paste('+'),
['*'] = require('vim.ui.clipboard.osc52').paste('*'),
},
}

-- setting to 0 makes it default to value of tabstop
vim.opt.shiftwidth = 0
Expand Down

0 comments on commit 5ac65a6

Please sign in to comment.