Copy, Cut and Paste in VIM Editor
Copying, Cutting and Pasting are top most three operations people use excessively. According to my knowledge VIM has made these operations extremely easy as compared to other editors. Here is how those are used:
Copying text
Cutting text is simple: it’s the same as deleting. So whatever syntax you’re using for that, you’re actually just pulling that deleted text into a buffer and preparing it to be pasted.
Copying text
- y: yank (copy) whatever’s selected
- yy: yank the current line
Cutting text is simple: it’s the same as deleting. So whatever syntax you’re using for that, you’re actually just pulling that deleted text into a buffer and preparing it to be pasted.
- dd: delete the current line
- x: exterminate (delete) the character under the cursor
- X: exterminate (delete) the character before the cursor
- p: paste the copied (or deleted) text after the current cursor position
- P: paste the copied (or deleted) text before the current cursor position]
1. How to delete a "communication" word in a below sentence?
"Real communication happens in silence only"
If cursor is at beginning of the word then use dw - delete word
If cursor is somewhere in middle of the word then use diw - delete inside word
Like that you could make use of MODIFIERS & NOUNS to carry out any operation so efficiently and effectively.
Comments
Post a Comment