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

Operator pending - #152

Closed
jroes wants to merge 5 commits into
atom:masterfrom
jroes:operator-pending
Closed

jroes wants to merge 5 commits into
atom:masterfrom
jroes:operator-pending

Conversation

@jroes

@jroes jroes commented Mar 9, 2014

Copy link
Copy Markdown
Contributor

This is a rough implementation of operator-pending mode, with some explanation and discussion in #58 and #129.

Based on discussion in #129, this doesn't seem like it's the correct long-term solution to the problem.

All tests pass in this PR except for two new tests that came after I put in the original work for this mode that I haven't had a chance to look at --

Operators
the y keybinding
when selected lines in visual linewise mode
it saves the lines to the default register

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.

There's a lot of duplication here...could we rephrase the regular vim-mode list as not(.operator-pending)?

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.

I like this idea.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I hate the duplication too. I'm not sure if I can do that though. If by regular vim-mode you mean command-mode, once I start doing that things disappear from command-mode, because they aren't necessarily exclusive. They kind of mean something different in each mode. Maybe I can do two comma-separated selectors though...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Tried doing something like this:

'.vim-mode.command-mode:not(.mini), .vim-mode.operator-pending-mode:not(.mini)':
     'w': 'vim-mode:move-to-next-word'
    'e': 'vim-mode:move-to-end-of-word'
    'b': 'vim-mode:move-to-previous-word'
    'x': 'vim-mode:delete'
    'd': 'vim-mode:delete'
    'c': 'vim-mode:change'
...

But I don't think it's working. Is it possible this multiple selector format isn't supported by atom core?

@mcolyer

mcolyer commented Mar 10, 2014

Copy link
Copy Markdown
Contributor

@jroes I think we're on the right track here. There's a bit more refactoring to do but nice work so far.

@jroes

jroes commented Mar 12, 2014

Copy link
Copy Markdown
Contributor Author

@mcolyer @bhuga based on the discussion in #129 do you guys think it's worthwhile to see this through to its conclusion?

@mcolyer

mcolyer commented Mar 13, 2014

Copy link
Copy Markdown
Contributor

@jroes I still think this is useful.

@nathansobo

Copy link
Copy Markdown
Contributor

I think I may take a stab at reimplementing this rather than catching this up with master. I may change my mind. Either way I'll be sure to credit you in the change log and reference this PR.

@jroes

jroes commented Mar 18, 2014

Copy link
Copy Markdown
Contributor Author

@nathansobo totally good with me. sorry I haven't had a chance to devote more time to it!

@mcolyer

mcolyer commented Mar 19, 2014

Copy link
Copy Markdown
Contributor

@nathansobo @jroes are you cool with closing this out in favor of #183?

@nathansobo nathansobo closed this Mar 19, 2014
@willcosgrove willcosgrove mentioned this pull request Apr 9, 2014
@nubs nubs mentioned this pull request Nov 5, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants