Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add posfilter processor #20

Open
albfan opened this issue Sep 12, 2015 · 4 comments
Open

Add posfilter processor #20

albfan opened this issue Sep 12, 2015 · 4 comments

Comments

@albfan
Copy link
Owner

albfan commented Sep 12, 2015

Except for sparse searches, many times a search has an underliying pattern.

e.g. When searching "Foo" relating "function Foo" you may want to include only matches with "function" (search function definition) or exclude them (search function calls)

@albfan
Copy link
Owner Author

albfan commented Dec 11, 2015

This feature aim to a plugin feature for ag.vim. A supposed implementation for definitions/callings:

  • based on filetype, define a pattern to search callers and callees
  • Activate postfilter
  • Activate option (definition or callings)
  • Do searchs
  • Ease regular basis operation (Using unite, or some shortcut or custom functions)

@amerlyq
Copy link
Collaborator

amerlyq commented Dec 30, 2015

Related to #36 and #34. Maybe split-recombine all those ideas will help to refine interface.

@amerlyq amerlyq added the future label Dec 30, 2015
@albfan
Copy link
Owner Author

albfan commented Jan 11, 2016

Use g:ag to define postprocesor variable. It will be a function which process each line and returns the filtered result.

e.g: pseudocode Implementation for definition/callings on vimL:

  • Add a handler to AgSet or AgToggle
  • Detect enable or disable to g:ag.callers or g:ag.callees with third party plugin which adds a postprocessor (can be only one var but this way seems more clear)
  • postprocesor function filters lines with fu.*<search> at start (for definition), and not start with fu for callings

@albfan albfan removed the future label Aug 27, 2016
@albfan
Copy link
Owner Author

albfan commented Jan 31, 2022

With 5f3ea8d place to put this is mostly defined.

Instead of an IgnorePattern, this match patterns will work finding callers/callees or similar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants