Search, Find and Replace - Part One -> Done

This commit is contained in:
2025-08-20 19:35:32 +03:00
parent 8b517d4d50
commit 2643062d7a

View File

@@ -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>.