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

Treat searches as text objects #76

Open
ghost opened this issue Mar 4, 2012 · 2 comments
Open

Treat searches as text objects #76

ghost opened this issue Mar 4, 2012 · 2 comments

Comments

@ghost
Copy link

ghost commented Mar 4, 2012

I'm not sure whether "text object" is the proper term here, but please read on!

Basically, in Vim, you can type d/hamster, hit enter, and Vim will delete all text until the first occurrence of the word "hamster". This is consistent with the fand t movement commands—you can use them to move to the first occurrence of a letter, or you can delete/change/select all text until that first occurrence.

It would be extraordinarily useful if Vintage could provide similar functionality.

@misfo
Copy link
Collaborator

misfo commented Apr 6, 2012

Right now Vintage just uses the built-in incremental search to implement these. I don't see any way to use incremental search and have it act as a motion. We could implement a completely separate search that just uses an input widget, but that seems like a downgrade at this point...

@adelgado
Copy link

This is maybe the last feature I miss a lot from vim in Vintage mode. I find myself typing things like d/" or d/< all the time, only to be disappointed. I don't know the specifics about plugin implementation, but from what I've understood, the problem is that using Sublime's incremental search we cannot treat the search hit as a motion; is that correct?

I agree that the standard / search should be Sublime's, since it is more powerful, but is there any way we could make d/ work using another search? Would it be simple to implement? By simple, what I mean is: Is there a documented way to show an input widget, and perform a motion on an Vintage d/ event?
Alternatively, could anyone suggest another workflow that has the same end result (Deleting until a certain match)?

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