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

Support :g[lobal]/[pattern]/[command] #3010

Open
Leekao opened this issue Aug 30, 2018 · 8 comments
Open

Support :g[lobal]/[pattern]/[command] #3010

Leekao opened this issue Aug 30, 2018 · 8 comments
Labels
area/commandline kind/feature status/works-with-neovim https://github.com/VSCodeVim/Vim#neovim-integration
Milestone

Comments

@Leekao
Copy link

Leekao commented Aug 30, 2018

One of the main reasons I love VIM so much is the option to do "g/console.log/d" to clear out all the lines with console.log on my scripts, is there any chance of supporting it?

@Leekao Leekao changed the title Please add support for "g/[pattern]/[command] Please add support for "g/[pattern]/[command]" Aug 30, 2018
@jpoon
Copy link
Member

jpoon commented Aug 30, 2018

This should work with neovim if you want to give it a try.

@jpoon jpoon added kind/feature area/commandline status/works-with-neovim https://github.com/VSCodeVim/Vim#neovim-integration labels Aug 30, 2018
@remler
Copy link

remler commented Dec 5, 2018

The ability to do global search and replace is CRITICAL to a VI emulation. This is the single reason I would use the program. If it doesn't support global search and replace, for example by doing:

:g/old pattern/s//new pattern/g

then that effectively breaks the program for me I'm afraid.

@Leekao
Copy link
Author

Leekao commented Dec 10, 2018

@remler Until this is added please note that you can just mark the lines visually and then use "s/old/new/g"

@SHanded
Copy link

SHanded commented Dec 18, 2020

Hmm, 2 years ago... not having much hope for global to be implemented at this point. It's one of VIMs absolutely most powerful features... such a pity.

@J-Fields J-Fields changed the title Please add support for "g/[pattern]/[command]" Support g[lobal]/[pattern]/[command] Oct 15, 2021
@J-Fields J-Fields changed the title Support g[lobal]/[pattern]/[command] Support :g[lobal]/[pattern]/[command] Oct 15, 2021
@J-Fields J-Fields added this to the Backlog milestone Oct 15, 2021
@brianjmurrell
Copy link

:1,$<command> (i.e. :1,$s/foo/bar/) is a workaround, but I would imagine much less efficient as it's applying the command to every line instead of only lines that match a pattern as would happen with :g/foo/s//bar/.

But probably more important/annoying is just the lack of something that a lot of people have muscle-memory for.

@remler
Copy link

remler commented Apr 10, 2022 via email

@martchellop
Copy link

I'm interested in implementing this feature. How would I go about doing that?

@airstrike
Copy link

just wanted to +1 as this is the single feature I miss on vscode vim. I don't think I've noticed anything else missing to date...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/commandline kind/feature status/works-with-neovim https://github.com/VSCodeVim/Vim#neovim-integration
Projects
None yet
Development

No branches or pull requests

8 participants