mirror of
https://github.com/Hizenberg469/Vim-tutorials.git
synced 2026-04-19 22:02:24 +03:00
Search, Find and Replace - Part One -> Done
This commit is contained in:
38
vim-commands
38
vim-commands
@@ -427,3 +427,41 @@ Line mode:
|
||||
that we did for first string i.e. repeat the process that we performed above.
|
||||
|
||||
|
||||
@ Command: "?<string-pattern>
|
||||
|
||||
|
||||
What does it do?
|
||||
|
||||
It search for the string matching the pattern in reverse direction of the current
|
||||
cursor postion.
|
||||
|
||||
Here, "n" search for next pattern match in reverse direction. "N" does the reverse
|
||||
of what "n" command does.
|
||||
|
||||
|
||||
@ Command: "*"
|
||||
|
||||
What does it do?
|
||||
|
||||
It search for the next occurances of the exact string(not string-pattern) which is near or where
|
||||
the current cursor is positioned.
|
||||
|
||||
|
||||
@ Commmand: "#"
|
||||
|
||||
What does it do?
|
||||
|
||||
It seah for the next occurances of the exact string(not string-pattern) which is near or where
|
||||
the current cursor is positioned.
|
||||
|
||||
%% TIPS %%
|
||||
|
||||
We can use editing commands like deleting(d), yanking(y), etc. with these searching command.
|
||||
|
||||
For ex:
|
||||
|
||||
Pressing "d" command and then using "/<string-pattern>" will leads to deleting of characters
|
||||
from the current cursor position to the next occurance of the <string-pattern>.
|
||||
|
||||
Pressing "<register-name> with "y" command and then using "/<string-pattern>" will leads to
|
||||
yanking(copying) from the current cursor position to the next occurance of the <string-pattern>.
|
||||
|
||||
Reference in New Issue
Block a user