All Projects → qalshidi → vim-bettergrep

qalshidi / vim-bettergrep

Licence: MIT license
A better way to grep in vim.

Programming Languages

Vim Script
2826 projects

Projects that are alternatives of or similar to vim-bettergrep

bolt.nvim
⚡ Ultrafast multi-pane file manager for Neovim with fuzzy matching
Stars: ✭ 100 (+566.67%)
Mutual labels:  vim-plugin, nvim, ripgrep, ripgrep-frontend
swifty-vim
⌨️ A Vim plugin for Swift which provides file detection, syntax highlighting, support for compiling and running tests, and optional support for formatting and linting tools.
Stars: ✭ 18 (+20%)
Mutual labels:  vim-plugin, vim-plugins
code runner.nvim
Neovim plugin.The best code runner you could have, it is like the one in vscode but with super powers, it manages projects like in intellij but without being slow
Stars: ✭ 234 (+1460%)
Mutual labels:  vim-plugin, nvim
VimConfig
Configuration files for Vi-IMproved.
Stars: ✭ 23 (+53.33%)
Mutual labels:  vim-plugin, vim-plugins
so stupid search
It's my honor to drive you fucking fire faster, to have more time with your Family and Sunshine.This tool is for those who often want to search for a string Deeply into a directory in Recursive mode, but not with the great tools: grep, ack, ripgrep .........every thing should be Small, Thin, Fast, Lazy....without Think and Remember too much ...一…
Stars: ✭ 135 (+800%)
Mutual labels:  grep, ripgrep
vim-phpstan
A Vim plugin for PHPStan - https://github.com/phpstan/phpstan. It calls `phpstan` to do static analysis of your PHP code and displays the errors in Vim's quickfix list.
Stars: ✭ 26 (+73.33%)
Mutual labels:  vim-plugin, vim-plugins
hgrep
Grep with human-friendly search results
Stars: ✭ 335 (+2133.33%)
Mutual labels:  grep, ripgrep
qf helper.nvim
A collection of improvements for the quickfix buffer
Stars: ✭ 70 (+366.67%)
Mutual labels:  vim-plugin, nvim
Dot-It-Up
A collection of dotfile scripts, plugins, and clever hacks so that you can become the master of your own OS! 🚀
Stars: ✭ 254 (+1593.33%)
Mutual labels:  vim-plugin, nvim
tmuxjump.vim
A plugin to open file from file paths printed in sibling tmux pane
Stars: ✭ 50 (+233.33%)
Mutual labels:  nvim, grep
Find-String
A PowerShell script to provide functionality similar to grep or ack with highlighting.
Stars: ✭ 56 (+273.33%)
Mutual labels:  ack, grep
nvim-toggle-terminal
NeoVim plugin that toggles a terminal buffer in the current window maintaining the same shell instance
Stars: ✭ 54 (+260%)
Mutual labels:  vim-plugin, nvim
writable search.vim
Grep for something, then write the original files directly through the search results.
Stars: ✭ 47 (+213.33%)
Mutual labels:  vim-plugins, grep
vim-jsonc
⚠️Deprecated⚠️: Vim syntax highlighting plugin for JSON with C-style line (//) and block (/* */) comments.
Stars: ✭ 52 (+246.67%)
Mutual labels:  vim-plugin, vim-plugins
vim-sass-colors
sass/scss/less/css color literal and color variable highlighting (works with imports)
Stars: ✭ 24 (+60%)
Mutual labels:  vim-plugin, vim-plugins
filestyle
filestyle is a Vim plugin that highlights unwanted whitespace and characters.
Stars: ✭ 30 (+100%)
Mutual labels:  vim-plugin, vim-plugins
Nerdtree
A tree explorer plugin for vim.
Stars: ✭ 16,380 (+109100%)
Mutual labels:  vim-plugin, vim-plugins
Coc.nvim
Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Stars: ✭ 18,268 (+121686.67%)
Mutual labels:  vim-plugin, nvim
vim-lamp
💡Language Server Protocol client for Vim.
Stars: ✭ 34 (+126.67%)
Mutual labels:  vim-plugin, nvim
cmp-rg
ripgrep source for nvim-cmp
Stars: ✭ 165 (+1000%)
Mutual labels:  vim-plugin, ripgrep

vim-bettergrep

A better way to grep in vim.

The purpose of this plugin is to provide a lightweight and enhanced version of the original :grep family of Vim commands.

This plugin implements RomainL's Instant grep + quickfix with a few of my own additions.

  • Abbreviates :grep with :Grep, as well as the rest: :lgrep, :grepadd, lgrepadd
  • In general faster than regular :grep
  • Autoconfigures the grep program based on what you have in your PATH in the following order:
  • Asynchronous grepping.
  • <C-g> in normal mode mapping to :Grep in command mode.

Installation

With vim-plug:

Plug 'qalshidi/vim-bettergrep'

Usage

Either type :grep or press <C-g> and start searching your files :).

Demonstration

Configuration

Don't map my CTRL-G!

let g:bettergrep_no_mappings = 1

I want to use some_grepper!

let g:bettergrepprg = "<some_grepper>"

I want to use git grep!

let g:bettergrepprg = "git grep --column -n"
" or using tpope/vim-fugitive plugin's :Ggrep

I want to use git grep when my current directory is a git repository!

autocmd VimEnter * if isdirectory('./.git') | let g:bettergrepprg = 'git grep -n --column' | endif
if exists('##DirChanged')
  autocmd DirChanged * if isdirectory('./.git') | let g:bettergrepprg = 'git grep -n --column' | endif
endif

Don't abbreviate my :grep!

let g:bettergrep_no_abbrev = 1

It is not ignoring my hidden files/.gitignore files!

Frequently Asked Questions

How do I grep a pattern with spaces?

  • Try enclosing your pattern in single quotes like this:
:Grep 'my pattern' my/file/path

How is this different from vim-grepper?

  • vim-bettergrep is a lightweight enhancement to :grep and tries to imitate the original Vim commands. To me, it seems vim-grepper is beefier and its own beast, allowing multiple grep commands and loading everything at start up as opposed to using Vim's autoload feature. They both have their own use cases. I am happy with original Vim's grep and don't necessarily need more than that.

How is this different from ack.vim?

  • bettergrep is mostly like ack.vim with a bit more opinionated defaults, quickfix window mappings that are more like NERDTree mappings. Asynchronous execution baked in by default. bettergrep also is more agnostic than ack.vim albeit ack.vim is still configurable, so the command functions are :Grep instead of :Ack.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].