Skip to content

Conversation

@davidbrochart
Copy link
Contributor

@davidbrochart davidbrochart commented Oct 29, 2016

Hi @jonathanslenders,

Here is a search-and-replace feature that is a first step towards the Vi substitute command. It doesn't follow the :s/foo/bar/g syntax, instead you need to hit s in selection mode, enter the searched text, hit /, enter the replacing text, and finally hit Esc. The matching text inside the selection will be replaced.

@davidbrochart
Copy link
Contributor Author

When we get the exact Vim syntax, we can have neovim's incremental substitute for free ;-)
https://asciinema.org/a/92207

@jonathanslenders
Copy link
Member

Yeah, that's something I'd like to have for Pyvim at some point. However, it will probably never be fully compatible. Having the performance of Vi and its regex engine is not possible in pure Python.

For this in particular, I'm also considering to go for the "multiple cursors" route. It should be possible to turn a search operation in multiple cursors. But then again, that's not something standard Vi, and I prefer to keep following standards.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants