9

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!

7

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.

  • 1
    In fact you just need to press F3, C-z first is not required – Steve Lorimer Oct 3 '18 at 2:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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