Fix automatic Neovim yanks in remote sessions
This commit is contained in:
1 parent
31bd80daa4
commit
7270ee5021
2 files changed
+61
No files matched your search
@@ -0,0 +1,9 @@
|
||||
echo "Enable automatic Neovim clipboard yanks in remote sessions"
|
||||
|
||||
nvim_provider="$HOME/.config/nvim/lua/config/remote_clipboard.lua"
|
||||
|
||||
if [[ -f $nvim_provider ]] &&
|
||||
grep -qF 'name = "OmarchyRemoteClipboard"' "$nvim_provider" &&
|
||||
! grep -qF 'vim.opt.clipboard = "unnamedplus"' "$nvim_provider"; then
|
||||
sed -i '/^ vim.g.clipboard = {/i\ -- LazyVim disables clipboard syncing over SSH; our provider supports it.\n vim.opt.clipboard = "unnamedplus"\n' "$nvim_provider"
|
||||
fi
|
||||
Reference in new issue
Block a user