Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow c option for confirmation when using Acks #17

Closed
jfelchner opened this issue Aug 1, 2015 · 7 comments
Closed

Allow c option for confirmation when using Acks #17

jfelchner opened this issue Aug 1, 2015 · 7 comments

Comments

@jfelchner
Copy link

Mass find and replace is a great first step, but I typically always confirm each of my replacements. Currently if you try to do something like :Acks /foo/bar/c it throws an error. My guess is that you're just passing this to argdo in which case any options should be sent verbatim to argdo. Including if the user chooses to do a find/replace with something other than / as the delimiter.

For example: :Acks -some/thing/with/slashes-another/thing/with/slashes-c

@jfelchner
Copy link
Author

So I just took a look and I think that the sanity check that is being done here just needs to be removed. It was a good thought, but there are too many variables for how a user can decide to create a substitution pattern. Passing the value through with no checks is the better option. Let argdo blow up if something isn't right.

@wincent
Copy link
Owner

wincent commented Aug 1, 2015

I'm open to making the sanity check more flexible, but not removing it.
On Sat, Aug 1, 2015 at 2:06 AM Jeff Felchner notifications@github.com
wrote:

So I just took a look and I think that the sanity check that is being done
here
https://github.com/wincent/ferret/blob/master/autoload/ferret/private.vim#L242-L245
just needs to be removed. It was a good thought, but there are too many
variables for how a user can decide to create a substitution pattern.
Passing the value through with no checks is the better option. Let argdo
blow up if something isn't right.


Reply to this email directly or view it on GitHub
#17 (comment).

@jfelchner
Copy link
Author

@wincent I'll look into it.

@wincent
Copy link
Owner

wincent commented Aug 2, 2015

I'm thinking it can be as simple as changing the regex to something like '\v^(.).+\1.*\1c?$, and then passing the c through if present.

@jfelchner
Copy link
Author

@wincent was something like this merged in?

@wincent
Copy link
Owner

wincent commented Aug 21, 2015

Yes. See the commit linked above (937d61b), currently in master.

@jfelchner
Copy link
Author

Cool! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants