vim-cheat-sheet icon indicating copy to clipboard operation
vim-cheat-sheet copied to clipboard

Add `gn` command

Open h908714124 opened this issue 6 months ago • 0 comments

Imho gn is important enough to be added in section "Search and replace".

gn                      Search forward for the last used search pattern, like
                        with `n`, and start Visual mode to select the match.
                        If the cursor is on the match, visually selects it.
                        If an operator is pending, operates on the match.
                        E.g., "dgn" deletes the text of the next match.
                        If Visual mode is active, extends the selection
                        until the end of the next match.
                        'wrapscan' applies.
                        Note: Unlike `n` the search direction does not depend
                        on the previous search command.

See also: http://vimcasts.org/episodes/operating-on-search-matches-using-gn/

h908714124 avatar Aug 06 '24 08:08 h908714124