diff --git a/.searching.txt.swp b/.searching.txt.swp new file mode 100644 index 0000000..84aade5 Binary files /dev/null and b/.searching.txt.swp differ diff --git a/vim-commands b/vim-commands index bc2cce2..765a317 100644 --- a/vim-commands +++ b/vim-commands @@ -367,3 +367,63 @@ Line mode: It perform operation and behave in similar manner as done by t + 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 :- / + + What does it do? + + It searches for the . + + Using "n" command will search for next 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 s' until + new search is done which in turn highlight the new . + 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. + +