Category: digital     |    Tags: android  

Vim: Copy and paste to termux clipboard

Copying to system clipboard from vim is usually done by using the “+ register. Unfortunately this will not work in termux. Here is a workaround to cut, copy and paste from android clipboard. Remember that you need termux-apk tools for this to work.

vnoremap <C-x> :!termux-clipboard-set<CR>
vnoremap <C-c> :w !termux-clipboard-set<CR><CR>
inoremap <C-v> <ESC>:read !termux-clipboard-get<CR>i

Related Posts

Building markor from source code in linux
© 2019 - 2024 · Home ยท Theme Simpleness Powered by Hugo ·