Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Edit buffer while keeping Helm results open

Is it possible to visit a buffer from the result list of Helm while keeping the Helm buffer open? Or is there some other way of achieving the same effect?

I often need to do tasks that involve searching some files, and visit each of them, but the way it works now I have to redo the search everytime I'm done visiting a buffer.

EDIT: FWIW, if using spacemacs, SPC r l is bound to helm-resume

like image 803
altschuler Avatar asked Mar 27 '15 10:03

altschuler


3 Answers

You can revive the last Helm session with the helm-resume command (bound by default to Ctrl-x c b). This should effectively achieve what you want.

You can also save the search results to a buffer with Ctrl-x Ctrl-s.

like image 136
Pedro Romano Avatar answered Nov 02 '22 09:11

Pedro Romano


helm-follow-mode will show the results of a helm list while moving the cursor point up and down the helm results list.

For example in Spacemacs, SPC T s opens helm with a list of themes, C-c C-f activates helm-follow-mode and now the themes are applied when navigating up and down the list.

like image 26
jr0cket Avatar answered Nov 02 '22 10:11

jr0cket


Icicles lets you do this. With Icicles search you can navigate among the search hits (across the set of searched buffers or files).

You can cycle among the search hits, but you need not cycle. You can visit any hits you choose, in any order. You can dynamically filter the hits by typing a filter pattern, which you can change on the fly.

You can combine multiple such dynamic filter patterns, using several simple patterns in place of a more complex one. Pattern matching can use apropos (regexp) matching or any of several kinds of fuzzy matching. You can also filter by chipping away dynamic matches, subtracting them from the current, wider set of matches.

You can even search, not the search contexts you defined at the outset of searching, but their complement.

(Icicles search lets you define the contexts to search - for example, only function definitions or only comments. Other text is ignored (not searched). The simplest example is the lines of a buffer as search contexts. Line search contexts are what grep, occur, and icicle-occur use.)

You can also replace individual search hits, or the parts of them that match your current input pattern, on demand, without exiting Icicles search. And you can change the replacement text anytime during search, on demand.

In the limited sense of such replacement you can thus not only visit the searched buffers but edit them, without ever exiting search.

like image 20
Drew Avatar answered Nov 02 '22 10:11

Drew