Skip to content

Instantly share code, notes, and snippets.

@shinokada
Created December 13, 2013 08:49
Show Gist options
  • Save shinokada/7941503 to your computer and use it in GitHub Desktop.
Save shinokada/7941503 to your computer and use it in GitHub Desktop.
# To see what in the default register
:reg "
# To see what in the register 0
:reg 0 # yank register
# diw(delete inner word) will register in the default register.
# In order to put the yanked word, use `"0P`.
"0P
# Just to delete, use "_.
# e.g. to delete a word
"_diw
# copy to register a
# <C-V> to change to visual mode and select line(s) or word(s)
"ay # use a-z
# to paste it
"ap
# check it in register
:reg "a:
# Delete it in the register a
qaq
# check it again
:reg "a # should be nothing in register a
# help
:h quote_alpha
# You can append to a register
"Ayy # to append to a line
# or use
:yank A
# or append all lines which has def
:global/def/yank A
# <C-v> to change to visual mode and select lines
# to copy
"+y
# to paste
"+p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment