Sublime Forum

Pkg to edit just there in the "Find results" tab? Yes!

#1

Editing directly in the “Find results” would be cool, no?
Any change should be written to the file edited. I think is all there to be able to do this. Someone have tried? I can try it :smile:

0 Likes

#2

As far as I know, nobody has tried, but I have also often thought that this would be really cool to have.

0 Likes

#3

just started, github.com/SublimeText/FindResultsApplyChanges

Basically, you have a “tab” named “Find Results”(standard ‘file results’ from ST), and any change made to the content of that tab, can be applied back to the files, by going to “Main menubar” -> “Find” -> “Find Results Commit Any Change Made”.

Today, is a quick and dirty hack. Is just a start, pull requests welcome…! see bugs

Just in case, will only apply changes to these lines starting with numbers. :stuck_out_tongue_winking_eye:

0 Likes

#4

So cool…!

0 Likes

#5

Great idea and great first implementation! I was thinking that it would be cool to commit on save (like some the git package) and you have on the list of bugs… :smile:

0 Likes

#6

Just updated it, now uses regions instead of regexp. So, newlines can be inserted… but that will shift the newlines… and if you apply(aka commit changes) more than once, the file will end corrupt. I added an “alert” to avoid just that. Buf if you modify the file in another tab… the same corruption can happens… not a big deal for my use case.

Thinking… To avoid this what we need is linked Regions… (regions that reflect the content of Regions in other files… or buffers…) … this will allow us to do all sort of hacks ala LightTable… keep dreaming… :stuck_out_tongue:

For my general purpose, (I like to rename things from time to time…) this is just great! bothers me just the following:

  • Trivial: Hook CTRL/CMD+S to apply the changes (how to?)
  • Annoying: Double click in these lines with numbers and a colon will open the file, default ST behaviour(how to disable it?)

Any ideas?!

0 Likes

#7

Hi. Not sure if you still check this, but while this works when making changes to code, is there any way to delete an entire block of code from the Find Results page?

0 Likes