Skip to content

Commit

Permalink
fix: make yanks work on termux
Browse files Browse the repository at this point in the history
  • Loading branch information
JRasmusBm committed May 23, 2024
1 parent 98ef1c8 commit 637ec8e
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions vim/plugin/yanking.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
if not require("jrasmusbm.compat").in_termux() then
vim.keymap.set({ "n" },"<C-Y>", '"+y', { noremap = true })
vim.keymap.set({ "n" },"<C-P>", '"+p', { noremap = true })
vim.keymap.set({ "v" },"<C-Y>", '"+y', { noremap = true })
vim.keymap.set({ "v" },"<C-P>", '"+p', { noremap = true })
end
vim.keymap.set({ "n" },"<C-Y>", '"+y', { noremap = true })
vim.keymap.set({ "n" },"<C-P>", '"+p', { noremap = true })
vim.keymap.set({ "v" },"<C-Y>", '"+y', { noremap = true })
vim.keymap.set({ "v" },"<C-P>", '"+p', { noremap = true })

vim.cmd [[
augroup ShowYank
if exists('##TextYankPost')
autocmd TextYankPost * lua vim.highlight.on_yank {higroup='IncSearch', timeout=200}
if exists('##TextYankPost')
autocmd TextYankPost * lua vim.highlight.on_yank {higroup='IncSearch', timeout=200}
endif
augroup END
]]
augroup END
]]

0 comments on commit 637ec8e

Please sign in to comment.