Skip to content
This repository was archived by the owner on Apr 6, 2018. It is now read-only.

Implement operator pending mode and text objects - #183

Merged
bhuga merged 11 commits into
masterfrom
ns-operator-pending
Mar 19, 2014
Merged

bhuga merged 11 commits into
masterfrom
ns-operator-pending

Conversation

@nathansobo

Copy link
Copy Markdown
Contributor

🚈 In progress 🚈

This PR adds operator pending mode. It also refactors how commands are registered and how operations are pushed and processed.

  • i w
  • a w
  • sentence text objects (i s and a s)
  • paragraph text objects (i p and a p)
  • quote text objects (i " etc)
  • bracket text objects (i ( etc)
  • indent text objects (ii and ai)

Closes #177

Nathan Sobo added 8 commits March 17, 2014 22:08
We were calling everything we could push to the op-stack an operator,
which wasn't technically correct. For example, motions aren't operators.
This uses the more general term "operation" instead.
This way we *never* call ::pushOperations with non-operational values.
@nathansobo

Copy link
Copy Markdown
Contributor Author

Shout out to @jroes for taking a stab at this in #152.

@jroes

jroes commented Mar 19, 2014

Copy link
Copy Markdown
Contributor

Yeah! Lovin' it. Glad you decided to continue on the clarity train with operation btw.

@lloeki

lloeki commented Mar 19, 2014

Copy link
Copy Markdown
Contributor

and text objects

This is awesome and really important in order to make this vim-mode not merely a thin key binding shim. It does not have to be a full vim port but having real composability of verbs/adjectives/objects is the key.

@mcolyer mcolyer mentioned this pull request Mar 19, 2014
Nathan Sobo added 2 commits March 19, 2014 11:30
Comment thread keymaps/vim-mode.cson

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should also work in visual mode. Guess I need a test for that.

@bhuga

bhuga commented Mar 19, 2014

Copy link
Copy Markdown
Contributor

Merging this. This is the hard part of the diff, and it will be impossible to keep it up to date with master. New text objects can be added cleanly in another pull.

@nathansobo ❤️

bhuga pushed a commit that referenced this pull request Mar 19, 2014
Implement operator pending mode and text objects
@bhuga
bhuga merged commit 5e69b2a into master Mar 19, 2014
@bhuga
bhuga deleted the ns-operator-pending branch March 19, 2014 20:56
@willcosgrove willcosgrove mentioned this pull request Apr 9, 2014
@clintberry

Copy link
Copy Markdown

so is this in a state now where we just need to add the keybindings manually for i ", i {, etc? I see i w was added so that is awesome.

@bhuga

bhuga commented Jun 5, 2014

Copy link
Copy Markdown
Contributor

#286 implements those. It will land 🔜

@nubs nubs mentioned this pull request Nov 5, 2014
MarkusSN pushed a commit to MarkusSN/vim-mode that referenced this pull request May 28, 2015
Implement operator pending mode and text objects
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"inside" commands don't work

5 participants