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

Open results without creating a new window? #4

Closed
af opened this issue Mar 17, 2015 · 7 comments
Closed

Open results without creating a new window? #4

af opened this issue Mar 17, 2015 · 7 comments

Comments

@af
Copy link

af commented Mar 17, 2015

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!

@af
Copy link
Author

af commented Mar 17, 2015

Commented out most of my .vimrc and <cr> worked as expected. So it looks like there's some conflict here with my configuration. For the record, with my full .vimrc both <cr> and ou are working the same as oa does.

@gabesoft
Copy link
Owner

ou/enter would work differently if you use 'or' or 'ol' the first time you open a file.

@af
Copy link
Author

af commented Mar 17, 2015

I reinstalled the plugin to be safe, and it worked correctly at first, but then went back to acting like oa (I never used anything but <cr> to open search results). Any ideas to help debug it, or suggestions on which options/plugins might be conflicting?

@gabesoft
Copy link
Owner

Oh, I think I would need to add that functionality. Currently, if no file has been opened from the search results <cr>, oa, and ou all open a window above the search results first. Afterwards, <cr> and ou will reuse that same window. But there's no functionality to open in the last used window before the search results opened. So, maybe I'll change <cr> to work that way. Actually, the only time this works that way now is if the file you want to open is already opened.

@af
Copy link
Author

af commented Mar 18, 2015

@gabesoft Ah ok, that makes sense then. Even if not the default, I would definitely be +1 on having an option to use the last window every time.

@gabesoft
Copy link
Owner

Fixed 1e3af3c

@af
Copy link
Author

af commented Mar 18, 2015

Awesome, thanks!

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