Created
December 13, 2013 08:49
-
-
Save shinokada/7941503 to your computer and use it in GitHub Desktop.
Yank registered ref: http://qiita.com/sokada/items/2915d56c7e70c03ccb76
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To see what in the default register | |
:reg " | |
# To see what in the register 0 | |
:reg 0 # yank register |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# diw(delete inner word) will register in the default register. | |
# In order to put the yanked word, use `"0P`. | |
"0P |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Just to delete, use "_. | |
# e.g. to delete a word | |
"_diw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# <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