-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Visual Mode + Rudimentary Operators #144
Conversation
85c7ef3
to
3318413
Compare
I now think this is good enough to get reviewed and merged in. There's still lots of work to do, obviously, but this works more or less like visual mode does (at least with our limited set of motions). Next I want to revisit what @guillermooo was looking at in #94 to make better abstractions for operators, with an eye for implementing numbers, the dot operator, and macros. I left TODOs as reminders of the most obvious places that need to be fixed when that infrastructure work is in place. |
Beautiful. I'll take a closer look tomorrow :) |
} | ||
|
||
setCurrentModeByName(modeName : ModeName) { | ||
this._modes.forEach(mode => { | ||
for (let mode of this._modes) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I'd prefer forEach
:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? IMO, for of
is much better than forEach
- it reads way nicer, and you can do for (const ... of)
which is not possible with forEach
. (Are you sure you haven't confused it with for in
?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙆♀️ Not that strongly attached to it so let's just go with for of
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha. The closer I get to bike shedding, the more argumentative I get, or something. 🌈
Sickkkk! 👍 ❤️ Dropped a couple of comments. |
@jpoon I think I got it all. Except the (Dunno what's up with Travis CI, but |
Convert test to async/await style.
Weird, all the builds are failing. I'll take a look in a couple of days -- work's got me busy :( |
Visual Mode + Rudimentary Operators
First cut at Visual Mode!