Skip to content

Code search plugin for Vim powered by rg / sift / pt.

Notifications You must be signed in to change notification settings

adonis0147/searcher.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

searcher.vim

Code search plugin for Vim powered by rg / sift / pt.

Dependencies

  • Vim 8.0+
  • Search tools (rg / sift / pt)

Quick Start

  1. Type :Searcher [options] <keyword> <path> in command mode.
  2. Explore the results.
    <c-j> ==> Jump to the next result
    <c-k> ==> Jump to the previous result
  3. Jump to the corresponding position.
  <c-o>   to open (same as Enter)
  go      to preview file, keeping focus on the results
  <c-t>   to open in new tab
  gt      to open in new tab, keeping focus on the results
  <c-h>   to open in horizontal split
  gh      to open in horizontal split, keeping focus on the results
  <c-v>   to open in vertical split
  gv      to open in vertical split, keeping focus on the results
  q       to close window

Commands

  • Searcher [options] <keyword> <path>
    Start searching.
  • SearcherCWD [options] <keyword>
    Start searching in the current working directory (as given by :pwd).
  • SearcherStop
    Stop searching.
  • SearcherClearAllCaches
    Clear all caches which are stored in $HOME/.cache/searcher.

Example

Type :Searcher -t vim func . (Use rg as the search tool and the options -t vim for rg is to search vim files.)

example

Note: The input options must be valid for the chosen search tool (default: rg).

Extras

  1. For convenience, you can add a shortcut by setting nnoremap <leader>a :Searcher -t %:e -S <C-R><C-W> .. As a result, you can search the word under the cursor in files with the same extension. - search tool: rg

About

Code search plugin for Vim powered by rg / sift / pt.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published