atom / find-and-replace

Find and replace in a single buffer and in the project
MIT License
242 stars 197 forks source link

Add find-next-in-project and find-previous-in-project #460

Open bronson opened 9 years ago

bronson commented 9 years ago

I'd like to map (say) cmd-alt-g to jump to the next result (even if it's a different file) and cmd-alt-shift-G to jump to the previous result. That way I could run through all the project search results without ever needing to return to the results window. (the actual keybinding doesn't matter)

Right now I need to go back to the Results window each time I want to jump to the next result. It's pretty time consuming.

Related to https://github.com/atom/find-and-replace/issues/326

rubydesign commented 9 years ago

I have been looking for this too.

After searching a bit i found one can return to the project find list and navigate with up/down and press enter. But next-in-project would really be needed, even without keybinding (which one can then do as one wishes)

bronson commented 9 years ago

@dancinglightning check out @t9md's https://atom.io/packages/project-find-navigation. Using j and k when you have "Open Project Find Results In Right Pane" turned on is delightful. Hope Atom finds a cleaner way of doing it but, until then, this is a big improvement.

aaronjensen commented 9 years ago

I use ctrl-n and ctrl-p, but that probably only works because I use Karabiner to remap those to up/down universally

bronson commented 9 years ago

@aaronjensen but up and down only move the highlighted row, right? They don't actually show the found text?

aaronjensen commented 9 years ago

ah, missed the "open project find results in right pane" bit, i'll try it out.

rubydesign commented 9 years ago

@bronson thanks for the tip. and the right pane helps. But the keys don't work. Up and down are ok. But j and k don't do anything. Up / down and enter will go to the file, but i don't know how to get back to the right pane.

bronson commented 9 years ago

@dancinglightning, you need to paste project-find-navigation's keymap suggestions into your own keymap? Here's mine: https://github.com/bronson/dotfiles/blob/master/.atom/keymap.cson#L36-L43

rubydesign commented 9 years ago

@bronson thanks, that's nice.

blah238 commented 9 years ago

:+1: This would be very helpful. The find results pane takes up a lot of precious space quite needlessly. A keyboard shortcut is much more efficient.

sebastien-mignot commented 8 years ago

I would like this a lot too. Really useful, and was present in all my previous editors (eclipe...). Any news if it'll be done ?

t9md commented 7 years ago

For the people who are using my project-find-navigation. I no longer use project-find-navigation, I use narrow instead, which I actively developing recently. So my motivation to maintain project-find-navigation is very low, maybe I will deprecate it.