Skip to content

Add gn command #403

@h908714124

Description

@h908714124

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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions