nvim: init: Fix copy and paste with clipboard when using tmux

This commit is contained in:
Sanchayan Maity 2022-03-17 16:59:53 +05:30
parent 9c9ab30bfd
commit ac29090179
1 changed files with 14 additions and 0 deletions

View File

@ -79,6 +79,20 @@ vim.g.matchup_surround_enabled = 1
-- textobj-word-column
vim.g.textobj_wordcolumn_no_default_key_mappings = 1
-- See :help clipboard and https://github.com/neovim/neovim/issues/14545
vim.g.clipboard = {
name = "tmux",
copy = {
["+"] = "tmux load-buffer -w -",
["*"] = "tmux load-buffer -w -"
},
paste = {
["+"] = "tmux save-buffer -",
["*"] = "tmux save-buffer -"
},
cache_enabled = true
}
-- We do this to prevent the loading of the system fzf.vim plugin. This is
-- present at least on Arch/Manjaro
vim.api.nvim_command('set rtp-=/usr/share/vim/vimfiles')