gabesoft / vim-ags Goto Github PK
View Code? Open in Web Editor NEWSilver searcher plugin for vim
Silver searcher plugin for vim
Great plugin! Can you add more information on the readme file on how to integrate it with lightline?
Please excuse me for asking a basic question - I am relatively new to VIM.
How can I map ":Ags" to something easy to type command? Maybe just "//", so a search could be performed using "//SearchText"
While there is an edit mode already (awesome!), it might still be useful to have the results in the location or quickfix list.
It was mentioned in #7 (comment) already:
So it would be really cool if there was some way of populating the location buffer or quickfix buffer with the results of ags.
I could imagine having a separate command for that and/or an action from the result window to trigger it.
When the encoding is inconsistent, the plug-in will not work properly.
test file:
新建文本文档.js
123哈哈
test command:
Arg --js 1
vimrc:
encoding = utf-8
fileencoding = cp936
results:
No target or display is not normal.
When pressing E
I can edit all the files without going through the process of opening every single file, make the change and close it. How can I save all the files when I'm in E
mode?
When I quit the window, I get:
E37: No write since last change
E162: No write since last change for buffer "search-results.agse"
Cheers,
Matthias
After searching, my result looks like this:
[1;31mdrivers/mmc/core/debugfs.c[0m[K
[1;30m 200 [0m[K-
[1;30m 201 [0m[K- mmc_claim_host(host);
[1;30m 202 [0m[K- mmc_set_clock(host, (unsigned int) val);
[1;30m 203 [0m[K:2: [32;40mmmc_release_host[0m[K(host);
[1;30m 204 [0m[K-
[1;30m 205 [0m[K- return 0;
[1;30m 206 [0m[K-}
There are no colors and escape characters are seen so obviously something went wrong. Tested on both vim and gvim 7.4 on Linux.
When I perform a search using the :Ags command, the search pane opens with the results displayed, however, I can't open any of the files in the searches results, either by pressing Enter, or by typing 'oa' or any of the other related commands.
when I press Enter, the status bar just reads; ": AgsOpenFileReuse" but nothing happens.
I'm using:
This plug-in is awesome. For me, the one thing that could make this plugin a must have is a feature a la "En Masse", aka replace:
https://github.com/Wolfy87/vim-enmasse
The workflow I have in mind is:
%s//
:w
in Ags buffer to magically edit all filesHey, this is a really cool feature, reduces the clutter in search results a lot. But it is way too slow as compared to Ag.vim . I haven't looked at the code, but I assume it's doing some post processing in vimscript to the results, and trying to create a buffer with locations, would be cool if you could somehow make it faster (maybe push the processing to ag and vim location buffer?)
just out of curious, why choose r/R
as default mapping for next/prev result? Why not just use n/N
, feels more intuitive.
I'm searching in a folder full of symlinks and getting no results for patterns I know are present. I've tried enabling symlink following in a couple of ways. In my config file, I added this: let g:ags_agargs['--follow'] = ['','']
, but I get an Undefined variable error. I've also tried adding the option in the command (:Ags --follow pattern
, but that also fails to produce results (No matches for '--follow pattern'
).
I can run the search for the same pattern specifying the location of the source file and get results, so it definitely seems the symlink is not being followed.
I have a nerdtree window open a lot of the times like...
My cursor is in the file contents window (right most) and when I do a search and press enter in the search results it always opens in the nerdtree window like...
Is this expected behavior? Some other issue I was reading gave me the impression that it would use the last window you were using.
Basically why?
When line numbers are off, replacing cuts the first part of the line
Every time I make a request I get an error. I had to install Python's request library, but this error exists after the install.
HTTP_Client_Response" [New File]
Error detected while processing function 65_DoHTTPRequest:
line 11:
Traceback (most recent call last):
File "", line 1, in
File "/Users/dsteplight/.vim/bundle/vim-http-client/plugin/http_client.py", line 124, in do_request_from_buffer
open_scratch_buffer(response, vim_ft)
File "/Users/dsteplight/.vim/bundle/vim-http-client/plugin/http_client.py", line 113, in open_scratch_buffer
vim.current.buffer[:] = contents
TypeError: bad argument type for built-in operation
Please, add a possibility to open a file in a new tab. I suggest use ot
mapping for that.
It would be awesome to have fold markers/regions so I could e.g. close all files (show only the path, fold away the search matches inside) and then scroll through the files list and expand those I'm interested in.
Hi,
I just updated from 3b95ee7
to latest master for the neovim async support (very nice by the way!) One thing I noticed is that something in between seems to have broken searches with spaces in them.
For example, :Ags "my string"
would return results before, now I get no results even though running ag "my string"
in the CLI gives the same results as before. Searches that don't have spaces still seem to work fine.
I'm using a recent-ish neovim if that helps.
I'm using Neovim. When I accidentally search from my home directory, or from anywhere that would take way too long, Ags freezes the whole UI so I have to kill the terminal to get out of vim. It does display some messages and the cursor jumps around in the search results window, but when I try pressing q or Ctrl-C nothing happens.
Sometimes you're only looking for a single search result, and then you have no further need for the results window. Ideally in this case you could open the result and dismiss the results window with a single keybinding (essentially, UO
and q
combined into one step). Thoughts on adding this as a built-in action?
Hi,
Is there a way to open a file from the search results without creating a new window/split? I want the results file to take up the window space I was using before calling :Ags
, but it seems to always open the results in a split between search-results.agsv
and the old window.
From the docs, it looks like <cr>
or ou
would do what I want, but it always opens a new window above the search results. Not sure if this is a weird interaction with my .vimrc or something.
Great plugin by the way!
Seems like (CtrlSF)[https://github.com/dyng/ctrlsf.vim/) provides the same functionality. Are there any other difference we should be aware of?
Is it possible to search from the root folder in a directory which has a .git folder? Similar to how CtrlP works.
Most people install ag into a directory which is part of their PATH variable. To have a simpler installation without configuring anything, vim-ags should look for the executable in the PATH first and not under a hard coded path.
See for example, like rking/ag plugin does it.
Would you like to add async support for Neovim and vim-dispatch? One example could be found from here
With the async support, it could also improve performance, because user doesn't need to wait for all results to be fetched.
I just upgraded to the new M1 MacBook and I'm getting what I think are the color encodings in the search results screen.
Not really sure if it's a problem with vim-ags
or something else. Wondering if anyone else has seen this or if anyone has any thoughts to fix it. Thanks!
I'm using
MacOS 11.2.2
Vim 8.2.1972
Tmux 3.1c
How can I return back to SearchView from Edit Mode?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.