13

Commands like helm-projectile-grep, helm-swoop, projectile-find-file are extremely useful for jumping around code. However, so far I've not found how I can open a search result in a new window (instead, right now pressing RET with a search result highlighted opens the search result in the window from which the original search command was executed).

I want to be able to optionally open a search result highlighted in the *helm grep* mode either in a horizontally or a vertically tiled window. For instance, I'd like the following functionality:

  • Pressing RET opens the highlighted result in the current window
  • Pressing C-c h RET opens the highlighted result in a new, horizontally tiled window
  • Pressing C-c v RET opens the highlighted result in a new, vertically tiled window

Here's an illustration:

enter image description here

Is something like this possible? Thanks for your time!

0

1 Answer 1

8

C-z will bring up a new buffer with actions available to helm, and I see the following: [f1] Open file [f2] Open file other window [f3] Save results in buffer [f4] Edit search results

So you want C-z f3

After this you can move around the results like a regular buffer, and if you have two windows up, hitting RET on a result entry will open the entry in the other window.

Note I'm using spacemacs and helm-ag, but I assume this will be the same.

3
  • 1
    In fact you just need to press F3, C-z first is not required Oct 3, 2018 at 2:01
  • 1
    What function do you have associated to C-z? I'm on Linux, that makes my Emacs go to sleep (suspend-frame)
    – Gauthier
    Mar 4, 2020 at 12:28
  • @Gauthier Yeah this answer is for spacemacs, TAB brings up the available actions to helm
    – Swedgin
    Mar 5, 2020 at 8:58

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.