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

extended normal mode command #40

Open
yarbelk opened this issue Jun 29, 2014 · 2 comments
Open

extended normal mode command #40

yarbelk opened this issue Jun 29, 2014 · 2 comments

Comments

@yarbelk
Copy link

yarbelk commented Jun 29, 2014

How should we implement the extended normal mode commands

(eg - compositions and arguments to commands)

2fd -> go to the second 'd' to the right

dt' -> delete until the '

Vi has a timeout on these, which lends itself to using a switch statement on channels. implementing the timeout first seems like overkill: I think implementing it the same way kisielk has implemented the count would allow us to get it up and running faster, and then we can refactor.

@yarbelk
Copy link
Author

yarbelk commented Jun 29, 2014

Some of these seem to be better written as functional compositions of visual, movement and normal (dt') -> d(t') ~> d(vt')

but implementing the simplest catagory - arguments to a command is probably the easiest first step.

@dtcaciuc
Copy link
Collaborator

mode/textobject.go does this by accepting range function argument and executing it after text object is fully defined on mode exit. This is used by 'd' command in mode/normal.go

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

2 participants