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!

Drew
  • 75,699
  • 9
  • 109
  • 225
space_voyager
  • 709
  • 5
  • 19

1 Answers1

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.

Mitchell Tracy
  • 181
  • 1
  • 2