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