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

In correct shortcut listed on main git page. #126

Open
drone1 opened this issue Dec 4, 2015 · 3 comments
Open

In correct shortcut listed on main git page. #126

drone1 opened this issue Dec 4, 2015 · 3 comments

Comments

@drone1
Copy link

drone1 commented Dec 4, 2015

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!

@sunflowerseastar
Copy link

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

@drone1
Copy link
Author

drone1 commented Jan 4, 2016

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'

@sunflowerseastar
Copy link

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?

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

No branches or pull requests

3 participants