Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
The
git grep
way of searching through files was a little bit uncomfortable, so we decided to investigate different alternatives for doing it in vim.We finally run into https://github.com/junegunn/fzf.vim which provides a fuzzy search using
fzf
andripgrep
.What's more it also provides other functionality like searching files in the working directory and in the buffer.
Details
Prerequisites
In order to be able to use it, you will need to install
fzf
andripgrep
orag
for searching through files.fzf
ripgrep
ag
How to use it
CTRL+/
to search though files contentsCTRL+\
to search for occurrences of the word under the cursorCTRL+p
for searching filesCTRL+b
for searching files in the bufferCustomization
There are a lot of ways of customizing
fzf.vim
commands. Refer to their docs in order to do it. It might be a good idea to add customizations to this plugin if we all feel confortable with them.