Replace command update

This commit is contained in:
2025-08-18 20:03:01 +03:00
parent f3d63b14d1
commit 8b517d4d50
2 changed files with 60 additions and 0 deletions

BIN
.searching.txt.swp Normal file

Binary file not shown.

View File

@@ -367,3 +367,63 @@ Line mode:
It perform operation and behave in similar manner as done by t + It perform operation and behave in similar manner as done by t +
<character> command. But, the searching is done in reverse order. <character> command. But, the searching is done in reverse order.
**Note**
All these are motion-commands. That means, we can use it with Editing
commands like d (delete), c (changing), y (yanking), etc.
@ Command :- /<string>
What does it do?
It searches for the <string>.
Using "n" command will search for next <string> occurance in current
opened file.
Using "N" command does the same thing. But, in opposite direction.
**Note**
For "/" command for searching the incsearch option should be set.
If it is not, we can use following line command:
:set is
To check if the configuration is set use command:
:set is?
For highlighting the searches, check for:
Check :set hls?
Output: nohlsearch
Do: :set hls
Note that hlsearch is enabled will highlight the <string>s' until
new search is done which in turn highlight the new <string>.
To turn off the highlight, use:
:nohls.
It will turn-off the highlights not disable it permanently.
%% Trick %%
> Using "/" command to find a string or string containing the pattern specified
and pressing enter will take to the first such matching string.
> If we now use "c + w" command the cursor which is present at the first letter
of the word will delete that word and we type certain word.
> After getting out of the insert mode, pressing "n" command will move the cursor
the cursor to the next string and pressing the command "." will repeat the changes
that we did for first string i.e. repeat the process that we performed above.