mirror of
https://github.com/Hizenberg469/Vim-tutorials.git
synced 2026-04-19 22:02:24 +03:00
cut-copy-paste started
This commit is contained in:
@@ -1,23 +1,25 @@
|
|||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
Cut this line and paste it after the line of hyphens.
|
Cut this line and paste it after the line of hyphens.
|
||||||
This is just some random text.
|
This is just some random text.
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
This line should come after "The quick brown fox jumps over the lazy dog."
|
This line should come after "The quick brown fox jumps over the lazy dog."
|
||||||
The quick brown fox jumps over the lazy dog.
|
The quick brown fox jumps over the lazy dog.
|
||||||
|
|
||||||
One does not simply walk into the data center.
|
One does not simply walk into the data center.
|
||||||
|
|
||||||
Every good boy deserves fudge.
|
Every good boy deserves fudge.
|
||||||
|
|
||||||
|
This is just some random text.
|
||||||
|
This is just some random text.
|
||||||
Its gates are guarded by more than just computer operators.
|
Its gates are guarded by more than just computer operators.
|
||||||
|
This is just some random text.
|
||||||
|
|
||||||
There are system administrators there that do not sleep.
|
There are system administrators there that do not sleep.
|
||||||
|
|
||||||
fi
|
if
|
||||||
|
|
||||||
badcfe
|
abcdef
|
||||||
|
|
||||||
to the beginning. Move this
|
Move this to the beginning.
|
||||||
|
|
||||||
Can you dupe this?
|
Can you dupe this?
|
||||||
|
|
||||||
|
|||||||
33
vim-commands
33
vim-commands
@@ -19,7 +19,7 @@ Normal mode commands:
|
|||||||
punctuation as a word.(move one word forward)
|
punctuation as a word.(move one word forward)
|
||||||
b: To move the cursor by one word on file. It include the
|
b: To move the cursor by one word on file. It include the
|
||||||
punctuation as a word.(move on word backward)
|
punctuation as a word.(move on word backward)
|
||||||
B: To move the cursor by one word on file. It include the
|
B: To move the cursor by one word on file. It don't include the
|
||||||
punctuation as a word.(move on word backward)
|
punctuation as a word.(move on word backward)
|
||||||
|
|
||||||
0: To move the first column of the current line the cursor
|
0: To move the first column of the current line the cursor
|
||||||
@@ -129,3 +129,34 @@ Line mode:
|
|||||||
click CTRL+D, which shows suggestation. To iterate through all the suggestion
|
click CTRL+D, which shows suggestation. To iterate through all the suggestion
|
||||||
without writing it explicity use <TAB> key. To iterate in reverse order use
|
without writing it explicity use <TAB> key. To iterate in reverse order use
|
||||||
<SHIFT>+<TAB>.
|
<SHIFT>+<TAB>.
|
||||||
|
|
||||||
|
|
||||||
|
-> Cut, Copy and Paste:
|
||||||
|
|
||||||
|
* d and x cut text, not just delete it.
|
||||||
|
* cut = delete and save into a register.
|
||||||
|
* Register is a clipboard-like storage location.
|
||||||
|
* This register is also known as default register or unnamed register.
|
||||||
|
|
||||||
|
> for pasting the text present in the default register use p command.
|
||||||
|
> if the line is cut using dd command then using 'p' will paste it below the current line where
|
||||||
|
the cursor is present.
|
||||||
|
> if 'P' command is used then it will paste above the current line where the cursor is
|
||||||
|
present.
|
||||||
|
> if a character is cut using 'x' or 'X' command using 'p' will paste the character
|
||||||
|
just after the current postion of the cursor.
|
||||||
|
> similarly, if 'P' command is used it will paste the character just before the current
|
||||||
|
position of the cursor.
|
||||||
|
|
||||||
|
Note:
|
||||||
|
> The data cutted is linewise then it will paste below/above current line.
|
||||||
|
> The data cutted is characterwise then it will paste before or after the current line.
|
||||||
|
|
||||||
|
> Standard - Vim terminology:
|
||||||
|
|
||||||
|
Cut = Delete
|
||||||
|
Copy = yank
|
||||||
|
paste = put
|
||||||
|
|
||||||
|
> for yanking(copying) use 'y' or 'Y' command.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user