aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgyoder <70408179+gyoder@users.noreply.github.com>2025-07-25 10:37:03 -0600
committergyoder <70408179+gyoder@users.noreply.github.com>2025-07-25 10:37:03 -0600
commit23363f30d2ed442158364fc345c3bb4d8beed565 (patch)
tree169b1eceb6853a03b03a97d19bd30fad88070bbb
parentdc21944ad2248050e0eb6627cfac22b6da9834d1 (diff)
nvim/tmux: added OSC52 copy and paste support for remote ssh sessions
-rw-r--r--tmux/.tmux.conf2
-rw-r--r--vim/.config/nvim/init.lua33
2 files changed, 32 insertions, 3 deletions
diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf
index 10c34d4..1589e31 100644
--- a/tmux/.tmux.conf
+++ b/tmux/.tmux.conf
@@ -3,7 +3,7 @@ set-environment -g TMUX_POWERLINE_THEME bubble
# Options
set -g mouse on
set -g default-terminal "screen-256color"
-set-option -sa terminal-overrides ',xterm-256color:Tc'
+set-option -sa terminal-overrides ',xterm-256color:Tc,xterm-*:allow-passthrough'
set-window-option -g mode-keys vi
set -g status-position top
set-option -g set-clipboard on
diff --git a/vim/.config/nvim/init.lua b/vim/.config/nvim/init.lua
index 7ffa06d..9409920 100644
--- a/vim/.config/nvim/init.lua
+++ b/vim/.config/nvim/init.lua
@@ -47,10 +47,39 @@ if vim.g.is_purdue then
vim.cmd("set noundofile") -- i forgor how to do this in lua so i didnt
end
+--
+-- vim.opt.spell = true
+-- vim.opt.spelllang = "en_us"
+--
-vim.opt.spell = true
-vim.opt.spelllang = "en_us"
+-- For init.lua
+vim.api.nvim_create_autocmd("FileType", {
+ pattern = "markdown",
+ callback = function()
+ vim.opt_local.textwidth = 80
+ end,
+})
+vim.o.clipboard = "unnamedplus"
+vim.api.nvim_create_autocmd("TextYankPost", {
+ callback = function()
+ vim.highlight.on_yank()
+ local osc52 = require("vim.ui.clipboard.osc52")
+ local contents = vim.v.event.regcontents
+ local regtype = vim.v.event.regtype
+
+ if type(contents) == "string" then
+ contents = { contents }
+ end
+ if regtype == "V" then
+ for i, line in ipairs(contents) do
+ contents[i] = line .. "\n"
+ end
+ end
+ osc52.copy("+")(contents)
+ osc52.copy("*")(contents)
+ end,
+})