Skip to content

Instantly share code, notes, and snippets.

@lidgnulinux
Created May 12, 2024 01:41
Show Gist options
  • Save lidgnulinux/627772038e88d57580da6b963f39dfb3 to your computer and use it in GitHub Desktop.
Save lidgnulinux/627772038e88d57580da6b963f39dfb3 to your computer and use it in GitHub Desktop.
GVIM simple trick (Copy and paste on terminal).

Using GVIM as alternative terminal. (Part I).

Copy and paste on terminal.

Copy.

  • To copy, press and hold the shift button and start to select our desired texts !

Paste

  • To paste, Press Ctrl+w followed by "* !
  • As alternative, we can make a shortcut / bind so we don't need to press Ctrl+w and "*. We can add these lines on gvim config file / .gvimrc.
:tmap <A-V> <C-w>"*
:tmap <A-v> <C-w>"*

Those lines will make Alt+v and Alt+Shift+v behave like <C-w>"* (which we use as paste shortcut).

@lidgnulinux
Copy link
Author

Perhaps, we also need to add / set mouse config.

:set mouse=a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment