Closed Shadowfiend closed 11 years ago
I would highly appreciate it if folks would use this branch for a little bit this week and see if it interferes with any of your day-to-day :s
usage. I will be doing the same :)
There is at least one issue with infinite looping going on in the new transform implementation, which can be triggered by trying to add a new function on a new line at the beginning of the line in an Objective-C header file. I'll be investigating this tonight or tomorrow.
Looks like this gentleman isn't properly respecting replacement ranges (it always operates on the whole file). Fix to come.
Finally fixed the range issues with this branch. Going to use it for a couple of days and see if everything seems kosher; if it does, then I'm going to go ahead and merge the branch unless I hear something :)
Merging this lovely lady in; please file an issue if you run into any problems with the new implementation.
I'm going to generally follow a policy of keeping a pull request open for my own stuff for at least a week to gather any feedback the community may want to give for now; this can evolve as the community grows. If I open a pull request and don't see any activity for a week, I'll go ahead and merge it in. Likewise, I'll try to give feedback on any requests I see within a week if at all possible.
This PR does a variety of things with the
:s
/:substitute
command, and fixes a couple of incidental issues because I ran into them as I was making these changes. Here's a list::s
. Before undo would undo each substitution in turn, whereas we now properly undo all substitutions at once. This is more in line with vim behavior.:s
. At the end of a substitution, the caret is now properly placed at the end of the last match that was substituted, or at the end of the file if nothing matched.:s
. After a substitution, the previous location in the jumplist is now the place where you were when you ran the substitution command. This means immediately after a substitution command, you can use''
or its sibling `` to return to the point you were at before you performed the substitution.:s
(this is the fix for issue #42). Newlines in the command will properly be matched. We also properly display the affected lines and the number of matches when the/n
flag is provided./m
regex flag in substitutions. vim handles this situation differently, providing various ways to indicate you're willing to match newlines with.
in the regex or whatever, but I'm trying not to deviate too far from more standard regex syntax if possible./n
flag isn't provided. Before you had to add/n
to the end of the pattern to see the lines/replacements, but when you ran the actual substitution that information was not reported. It is now reported when you run the regular substitution as well.:substitute
). We no longer hide messages when a status component changes if that change occurs during the same run loop cycle as the message was displayed.