Skip to content

Instantly share code, notes, and snippets.

@z2015
Last active June 6, 2016 10:05
Show Gist options
  • Save z2015/723b549500670d21756e8a6d59f93bf7 to your computer and use it in GitHub Desktop.
Save z2015/723b549500670d21756e8a6d59f93bf7 to your computer and use it in GitHub Desktop.
Vim 101: Register

###:reg To see all of the current registers tha are in use.

  1. '*' register is system clipboard
  2. '.' register stores what just typed , it's read-only.
  3. typing 'yy' will 'yank' this line .
  4. type ':reg' will show the 'yank' line in register 0

###Unnamed Register 1.'""'register will show the delete element. 2.'0' register will always show the last yank command. 3.p will put delete element rather than the yank element.

Named Registers

  1. ' "ayy ' will yank current line into register a.
  2. ' "ap ' will put it somewhere else.
  3. registers are stored in "/.viminfo " file .

source: http://usevim.com/2012/04/13/registers/

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