Skip to content

Instantly share code, notes, and snippets.

@duylam
Last active June 27, 2021 03:12
Show Gist options
  • Select an option

  • Save duylam/f61aec5b06049fadc99f37d818b4db74 to your computer and use it in GitHub Desktop.

Select an option

Save duylam/f61aec5b06049fadc99f37d818b4db74 to your computer and use it in GitHub Desktop.
Vim cheatsheet

Copy text in vim and paste at other GUI app (like Terminal, Firefox, etc.)

To copy text in vim into system clipboard to paste at other app (like Terminal), built-in vi in MacOS isn't compiled with GUI all tricks on Internet doesn't work. The possible option:

  • Install vim with brew: brew install vim, launch with vim (from brew) instead of vi (from MacOS)
  • Switch to Visual mode (type v)
  • Select the block
  • Use :+y to copy (read more)

Remove plugin in Plug

  1. Remove Plugg .. in .vimrc
  2. Run :PlugInstall
  3. Run PlugClean, type y (at bottom)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment