Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
–
–
–
–
–
–
–
–
/pattern - search forward for pattern
?pattern - search backward
n - repeat forward search
N - repeat backward
Some variables you might want to set:
:set ignorecase - case insensitive
:set smartcase - use case if any caps used
:set incsearch - show match as search
Basic search (once you have opened the file in
vim
) using
vim
:
-Hit
ESC
on your computer keyboard
-Hit the forward slash symbol on your keyboard
/
-Type the word or symbol you intend to search; for example, to search for the term "rbmq" type
/rbmq
-Hit
Enter
-Hit
n
to search forward (moving towards the end of the file) and
N
to search backward (moving towards the beginning of the file)
–
Thanks for contributing an answer to Stack Overflow!
-
Please be sure to
answer the question
. Provide details and share your research!
But
avoid
…
-
Asking for help, clarification, or responding to other answers.
-
Making statements based on opinion; back them up with references or personal experience.
To learn more, see our
tips on writing great answers
.