Code Monkey home page Code Monkey logo

ag.vim's People

Contributors

axelson avatar blandinw avatar blueyed avatar c9s avatar carlosgaldino avatar epmatsw avatar gcorbel avatar icco avatar lesguillemets avatar losingkeys avatar mileszs avatar morenoh149 avatar mutewinter avatar nicoder avatar paulhybryant avatar paulyoder avatar pope avatar rking avatar rstacruz avatar sayreblades avatar scintill avatar simono avatar technicalpickles avatar tpope avatar troydm avatar unceus avatar vagavond avatar walnuts avatar wingyu avatar wiredool avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ag.vim's Issues

Make it work with --group

When I set --nogroup, it works fine. When I set --group, it doesn't. Any chance to make it work with group enabled?

How do I disable :Ag from opening first result in buffer

Hello,

I just switched from :Ack, and I love the speed of it. However theres one small issue. When I run :Ag foo, it automatically opens first result in my buffer. Most of the times I use this tool merely to quickly find references using preview window, and don't actually want to edit the file.

How could I achieve the desired behavior?

Multiple search results, without overwriting old ones (multiple tabs)

Hi!

Is there a possibility to view multiple search results without overwriting old ones (different tabs)?

eg
I search :Ag "float: right;"
I see search results

I open new tab:
next I type :Ag sentences_hb
And got next search results

But my old ones (for float: right) results are gone (in previous tab).

Is it possible to implement that?

Key mappings lost when reopening Quickfix window

When the Quickfix window is closed (q oder :ccl) and reopened (:copen), Ag's key mappings are no longer available.
Perhaps a new command can be added that reopens the Quickfix window with the already available results and sets up the key mappings again?

Some mappings don't work in the location list

Running gv after :LAg blah gives the following:

E121: Undefined variable: b:height                                                                                                                                                                
E116: Invalid arguments for function printf(":normal %d\<c-w>_", b:height)                                                                                                                        
E15: Invalid expression: printf(":normal %d\<c-w>_", b:height)                                                                                                                                    
Press ENTER or type command to continue            

All mappings should be double checked to make sure they work in both windows.

Make `autoload/` work

The original ack.vim just uses plugin/, but this one has the frayed beginnings of autoloading.

Nice plugins autoload where possible. This should be nice.

glitch with search results & quickfix window

Related to #57 (comment) and #58.

There is currently a bug that introduces some wonkiness with getting the search results to show within the quickfix window. Here is the issue:

  • The first time I run :Ag example the search is run (in the background), the first result is automatically opened, the quickfix window is not opened, and the status bar says No matches for "example".
  • While on a file that is also the first result of the search you're about to execute running :Ag example will now correctly open the quickfix window, but now when you load one of the results into a buffer with o the quickfix window's results are cleared away.

I am using Square's maximum-awesome plugin set (default bundles here) on OS X Yosemite with vim 7.4.52.

Here are some screenshots illustrating the above:

screenshot 2014-11-02 10 55 51
screenshot 2014-11-02 10 55 54
screenshot 2014-11-02 10 55 59
screenshot 2014-11-02 10 56 03
screenshot 2014-11-02 10 56 17

unrecognized option '--vimgrep'

I installed ag.vim via vundle

When I search for something like :Ag car_names . I'm prompted with an error and usage information

ag: unrecognized option '--vimgrep'

Mappings

Could you make mappings changeable in .vimrc? (Like in https://github.com/Valloric/ListToggle -- and itegrate its functionality -- only two mappings really! if possible).

In current state I can't replace mappings which need 'l:matches_window_prefix' to be set.
As workaround, this file local var can be replaced with buffer local -- then I could use it in ftplugin for my own mappings.

P.S. At work I often search in kernel sources and preview feature 'go' is very useful for it.
But pressing 'go' for 20-50 entries isn't much pleasing. As temporary workaround I use direct mapping in ftplugin/qf.vim "nnoremap :copen". But in such case I can't use location lists (I need that l:matches_window_prefix, which local to your plugin only :( )

Doesn't ignore .hgignore files

While ag reads .hgignore and don't try to read all binary files, ag.vim doesn't and thus is pretty unusable. :Ag from vim will pretty much certainly output the "correct" sequence to garble all screen output and require me to restart the terminal session.

Check the exit status of `ag` commands

This could be used for displaying an error message when:

  • stuff isn't found
  • the ag command didn't work (if it's not installed or g:agprg is wrong)

And probably other things?

Keys help is too long

When using a terminal smaller in width than the length of the keys help text, i.e.:

ag.vim keys: q=quit <cr>/e/t/h/v=enter/edit/tab/split/vsplit go/T/H/gv=preview versions of same

This causes vim to show the "Press Enter or type command to continue" prompt.

How about an option to just not show the keys help text?

search highlighting not working when specifying paths

When I set g:aghighlight to enable search lighting, it works only if I don't specify a path to search. However, I like to include a path to significantly speed up my search.

e.g.

Ag searchthis will highlight search results
`Ag seachthis here/' will not

Furthermore, when it does work, it turns search highlighting on for all future searches in all buffers (not Ag search, but in buffer / searching). It would be nice if it were restricted to the quickfix search window.

Any way to do this? Thanks!

Shortcuts don't work

None of the shortcuts mentioned in the README work for me except the enter key to open a search result.

Strange search behavior

Scenario:
I'm searching the official Rails repo (cloned on my machine) for the word "DHH" and get a lots of results.

screenshot 2014-01-11 00 29 08

When I'm now closing the results and search again for "DHH" I just get one result.

screenshot 2014-01-11 00 29 24

I tried this outside of vim and it worked like expected and didn't produce this odd behavior.

PS: I'm not sure if this is intended, if yes, a short description in the Readme would be nice.

Doc: why ag.vim vs ack.vim

Hi,

I just noticed this project and I wondered if there's really a need for the fork.
To make ack.vim work with ag is just a matter of:

let g:ackprg = 'ag --nogroup --nocolor --column'

I use ag with ack.vim like that and it just works.

No hard feelings :)

Add search term to Quickfix List Status

I use ag.vim a lot. Often I do multiple searches to drill down to areas of code. This is easy to do because I can use :colder and :cnewer to go between the quick fix lists as long as I don't create more than 10. But, sometimes I forget what search a list is showing the results for. Could the plugin be updated to add the search that was used to create the list to the status bar of the quick fix window? This may also help with issue - #15

Clear results markers

After performing an Ag, a marker appears on all lines which matched.

marker

Is there a way to clear these markers?

Cannot jump to results after using :AgFile

After searching for files with :AgFile, normal :Ag searches won't let you jump to results (see the screenshot). I think g:agformat needs to be backed up when using :AgFile, so it can be restored when switching back to normal (text-within-files) searches.
2014-06-02-221611_501x95_scrot

Error in README

There is an error In "Configuration" section.
You should use ' instead of " because vims parser corrupts path, which you specify in "" but keeps untuched specified in ''.

Repoduced 10/10 with gVim on windows 7.

I know, its very minor bug, but anyway.

Avoid special windows

Some windows, like nerdtree windows have special properties, like certain sizes and properties (like not responding to C-w = ). Should we avoid opening results in those windows?

"let agpr" causes quickfix window problem

As I wanted to add a flag, I added this to vimrc:

let agprg="Ag --smart-case"

The problem is every line in quickfix begins with "|| " instead of the filename, e.g.

|| data/devices.txt:4:gadget

Not sure why that happens. The prefix is preventing quickfix from opening these files. It works fine without "let agprg", so is there any way to remove the double pipe?

Don't accept empty input

Re-open :Ag when enter is pressed? or just show a message? Either way don't open the quickfix window/location list with "ERR: What did you want to search for"

Clobbering terminal history

Hey! Just trying out the plugin and it seems to do what I want very well, however:

Is there any way of preventing it from leaving crap in the terminal when you exit vim?

Search patterns

I'm not sure how search patterns work and can't seem to find any documentation anywhere.

What type of expression does the pattern argument take? For example, how would I search for phrases['phrases']?

doesn't open quickfix list

When I run ":Ag term" from Vim it finds the first file with a match and opens it.
The status line says "No matches for term" even though it found at least one.
It does not open the quickfix list in a split window.

Highlight search only highlights results in first file opened

When you have g:aghihghlight=1 in your .vimrc and perform :Ag findstring, findstring is highlighted only in first opened file. If you navigate to the next search result from the quickfix window (or with :cnext/:cprevious) findstring is no longer highlighted.

The following patch fixes this:

--- autoload/ag.vim 2014-03-27 23:30:46.000000000 -0400
+++ autoload/ag.vim.patched 2014-03-29 14:25:27.000000000 -0400
@@ -71,6 +71,7 @@
if exists("g:aghighlight")
let @/=a:args
set hlsearch

  • call feedkeys(":let &hlsearch=1", "n")
    end

redraw!

Can't search on '--require', or anything with leading dashes

Hi, I wanted to find all occurrences of --require spec_helper in my files. No problem, right?

:Ag '--require spec_helper'

Except that this bombs out with ag: unrecognized option '--require spec_helper'

Is there any way to use a search string that has leading dashes?

wildignore settings are ignored

In my .vimrc I have

set wildignore+= /node_modules/, dist/*, foo, bar

Any time I use Ag to search for anything, results from dist show up. How can I get it to REALLY ignore that directory.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.