onivim / oni

Oni: Modern Modal Editing - powered by Neovim
https://www.onivim.io
MIT License
11.34k stars 299 forks source link

Feature: Search & Replace #614

Open bryphe opened 7 years ago

bryphe commented 7 years ago

For Oni, I'd like there to be an embedded / native search and replace capability, with the ability to find across files, and replace across files.

This should be easy to navigate, and I should be able to use the existing keybindings and knowledge I have in navigation through neovim/buffers in order to leverage this UI and the results.

This issue is to discuss what sort of functionality and flow we'd like to see in search and replace.

cyansprite commented 7 years ago

For my workflows, I'd prefer the flexibility to either have search results on the bottom, or on the side. But not sure exactly how it should look like yet!

Right... I'm not sure how it would work either, I've been thinking about this a lot (especially where I was making a plug in) and I got a really good feel for what I like and what I don't.

I've discovered that as far as typing in the search I would want it to be at the bottom of the screen.

Then to open in a vsp, or a new tab (we can make our own dialog even? my plugin just made a scratch buffer with a few options) with the results updating as they find them, I want to preview, split it, vsp it, or tab it with a command (p,s,v,t something like that)

Fold the regions so I can navigate with zj, zk.

There are a few more things... but those are the main things.

Sometime I will demo my plugin and show you how it works, and then see if we can create something similar but of course better with nice graphics and what not.

socketwiz commented 6 years ago

For Oni, I'd like there to be an embedded / native search and replace capability, with the ability to find across files, and replace across files.

That is built-in to vim already.

# create the list of files you want
:args `find . -name \*.js`
# create the pattern you want to search and replace on
:argdo %s/foo/bar/gc

Leave the c off the argdo command if you don't want to confirm each item.