ag.vim icon indicating copy to clipboard operation
ag.vim copied to clipboard

In correct shortcut listed on main git page.

Open drone1 opened this issue 9 years ago • 3 comments

https://github.com/rking/ag.vim

This page says that 'e' should be used (in the shortcuts section) to open and close a file, rather than what the help says, and what actually works, which is the 'O' key. Thanks!

drone1 avatar Dec 04 '15 00:12 drone1

It doesn't appear as though 'O' is implemented. Are you looking at ack.vim? Or am I confused..?

sunflowerseastar avatar Jan 02 '16 18:01 sunflowerseastar

I'm looking at the page linked above in my first comment, this section:

Keyboard Shortcuts

In the quickfix window, you can use:

e to open file and close the quickfix window o to open (same as enter) go to preview file (open but maintain focus on ag.vim results) t to open in new tab T to open in new tab silently h to open in horizontal split H to open in horizontal split silently v to open in vertical split gv to open in vertical split silently q to close the quickfix window

For me, I have to press 'O' rather than 'e' to open a file and close. Don't see anything weird in my .vimrc, just:

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

drone1 avatar Jan 04 '16 16:01 drone1

Sorry I wasn't clear. For me, 'O' does work for :Ack, and appears to be implemented in the ack.vim plugin.

However, 'O' does not work for me when using :Ag (pressing 'O' returns E21: Cannot make changes, 'modifiable' is off because it thinks I want to edit the quickfix list with the normal mode 'O' command), and it looks as though it is not implemented in ag.vim.

I am curious if you're maybe using ack.vim but thinking that ag.vim is handling your 'O' command from the quickfix list. That is to say, if 1) you have ack.vim installed, 2) you're setting the ackprg option to ag (per your let g:ackprg = 'ag...'), and 3) you're using the :Ack command—not :Ag—then you're actually using ack.vim, not ag.vim. (Note that in that scenario, you would be using the Ag search tool, but through the ack.vim plugin.) It's also possible that I'm confused. Can you confirm on your side that you are definitely using ag.vim and the :Ag command?

sunflowerseastar avatar Jan 04 '16 23:01 sunflowerseastar