Ваші коментарі

I like the way Fraize handles this, with a simple brief animation at the point of matching: http://www.youtube.com/watch?v=tABdEFrCniI 

This can currently be accomplished two ways:
  • Use Ctrl+Enter to insert a newline in the Replace field (the field probably should increase in height but doesn't now)
  • If S&R regex mode is turned on, use \n in the Replace field to insert a newline.

Well, one common use case that is helped by having an integrated solution is to do replaces across all currently open files, or all files in an open Sublime project, or some subset thereof. With an integrated multi-file S&R solution, this is easy to perform. With a third party tool, I have to re-select all the specific folders/files I want to run on, which can be tedious and sometimes error-prone.


As for this being "not something you do often", this is a function I need on a daily basis. Simple stuff like renaming a class or function in all of a project's files is a frequent task for me. With regard to the possibility of hosing your project with a bad multi S&R, I think just a "Preview" toggle would solve this nicely; just print a list of the replacements that would be performed in a new buffer.


Lastly, I disagree that this feature is particularly hard to implement. Sublime already has full S&R+regex functionality in place, so it is probably not a huge chunk of work to have this apply across multiple files.  In fact, your assertion that this is hard to implement made me realize that this could probably be done by just writing a Sublime package (though the UI would probably have to be kinda gimped). So, I'm going to take a crack at writing just such a package.


Thanks for the link to Regexxer. There are certainly some benefits to the dedicated third-party tool approach, such as using a GUI that is crafted around a singular core goal ("do one thing, do it well"). Sublime will never (and shouldn't) have such a detailed GUI for multi S&R; we just need the basic functionality.

Showing the cursor as you describe in Sublime is helpful in some respects. For example, it helps to indicate when you have end-of-line characters included in your selection; Shift-Down a few times to an empty line then Shift-Left to see this. Conceptually, I always think of it as the insertion point and this makes sense in the context of selection.


I think the main reason for this behavior, though, is Sublime's multi-cursor/multi-selection functionality. For example, Shift-Down a few times then Ctrl-Shift-L (Selection->Split Into Lines). Observe that you now have multiple cursors/selections and can operate on them simultaneously. In this situation, showing the cursor with its selection is a big help (and I would argue a near necessity). Having the cursor hidden (only) during a single-block selection would be inconsistent with this.