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

Create mapping or function for global with confirmation #148

Open
salcode opened this issue Jul 16, 2018 · 0 comments
Open

Create mapping or function for global with confirmation #148

salcode opened this issue Jul 16, 2018 · 0 comments

Comments

@salcode
Copy link
Owner

salcode commented Jul 16, 2018

Using a line like

:g/profile/d

is great to remove all lines that contain "profile". There are occasions when I want to delete most of the lines that match (or that I want to double-check the lines as I delete them).

When using substitute (e.g. :%s/profile//gc), I can do this.

I would like to be able to have the same confirmation process when using global.

Something like the following (which doesn't work) would be ideal.

:g/profile/dc

See how to delete all lines that match a pattern asking permission in vi and
Efficient way to delete line containing certain text in vim with prompt
as starting points.

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

No branches or pull requests

1 participant