If you run helm-ag (I typically do this with helm-projectile-ag, but I think it should be similar) and select a match, the file / buffer opens in the last used window.

My question is this: If a you already have the file / buffer open in an existing window, can you force the match to open in that window? This keeps the position of files in your frame more stable.

There's a similar question here: Open file in a specific window, but I figured this would be a common (and perhaps solved) use-case. If not, maybe I could override the action initiated on RET to scan my existing windows and, if a window has the right buffer already open, open it there? I'm not sure if there's a better way to do it.

Thanks for any help!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.