Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Feature: Goals / Achievements #1135

Closed
bryphe opened this issue Dec 15, 2017 · 5 comments
Closed

Feature: Goals / Achievements #1135

bryphe opened this issue Dec 15, 2017 · 5 comments

Comments

@bryphe
Copy link
Member

bryphe commented Dec 15, 2017

(I like the format of @kkd705's feature proposal, so I borrowed it!) This is another idea for lowering the bar / discoverability, specifically for editing commands.

PROBLEM

It's challenging to get started with modal editing. I'm sure lots of people are familiar with this graph of Vim's learning curve:

learning curve

A key issue is discoverability - how do I know what commands to use? How do I know what keypresses are relevant in a particular mode? How do I commit commands to memory?

One tip that I used while I was getting started with Vim was the sticky note method - I would put 3 new vim commands on a sticky note on my monitor. Once I was comfortable with those commands, I would switch to some newer ones. However, with the UI affordances that Oni has, I believe we can do better - and even gamify this.

SOLUTION

The idea is that, we have a set of commands available in each mode. Each command will have an associated goal. For example, use the 'word' motion 50x. Every time the motion is used, we'll bump up a graph in the 'learning' pane.

Once a learning goal is met, we'll pop up a quick UI, inspired by the achievement UI in consoles.

This would accomplish two things:

  • Make learning new commands/motions discoverable
  • Help users learn commands/motions they don't use frequently

A key note is that these achievements are, in general, modal - that means that, as the user changes modes, we'll automatically show them the goals or achievements that are relevant to that mode.

EXAMPLE

The user could open the goals pane via a command-palette entry, like:
goals-quickopen

Which would then expose a sidebar with the list of goals/achievements:

goals

As the user progresses, the bar would increase / show some animation to make it fun. Then, we could even show console-game-like achievements:

achievement

NOTE: A key element not shown is that, as the user switches modes, it would highlight a different set of achievements, that are specific to that mode. It'd be helpful to have a mode 'selector' that the user could use to choose which set of accomplishments to view, and it would automatically switch as the user changes modes.

IMPLEMENTATION IDEAS

Creating the UI is relatively straightforward. The major challenges are:

  • Getting the right hooks / learning when one of these 'goals' is acted on. Would this be at the keybinding level? Something in VimL? etc
  • How do we specify and document the hooks? For multi-step actions over time, using something like an epic or a saga might be helpful.
  • How to handle custom keybindings?
  • Where to persist this data?
  • What's the right level of granularity? In the example I showed achievements for h/j/k/l individually, but perhaps it would be better to group them into an achievement like "Arrow keys not needed"
  • What set of goals / accomplishments should we start with?

We could also have some fun hidden "achievements" like:

  • "VIM MASTER" - Quitting with :q X times :)
  • "BLASPHEMY" - Using arrow keys or mouse to navigate X times
  • Something about having lots of splits open...
  • "TWEAKER" - Modifying configuration

OTHER CONSIDERATIONS

  • The user should also be able to 'pin' achievements that they want to remember in the achievements pane.
  • It should be very very easy to disable this, and opt-in, as it would be annoying to the experienced vim user.

My prototype branch where I created the screenshot is: bryphe/proto/achievements

It'd be great to have feedback on whether or not this would be useful in general, ways to improve, and the sort of achievements / goals that would make sense.

Also, if anyone is interested in taking this on, feel free to run with it!

@CrossR
Copy link
Member

CrossR commented Dec 17, 2017

It'd be great to have feedback on whether or not this would be useful in general, ways to improve, and the sort of achievements / goals that would make sense.

I sent this to a friend of mine who know the basics of vim to use as an editor, (ie opening/saving/moving around with arrows/modes and a few "advanced" bits) but who doesn't especially know much past that except for if he looks it up or I go "Oooh just found X its really cool", and he thought it was a great idea!

I think its very interesting as well! My first thoughts on it were as follows:

  • This first one is basically an entire feature in itself, but basically, if we notice the user uses h/j/k/l a lot and nothing else, maybe there can be some form of recommendation of "Do you want to try the movement achievements?", so the user knows to move on from the basic movements. Or even for an advanced user we could go "We've noticed you've never used X feature...Did you know about it?" This is a giant task in itself, but just a brain dump so its written down, since there is so much in vim I go "Why on earth didn't I know about that before!".
  • I assume this is the case, since the plugin system is being made to be easily extensible, but it might be nice to have some way to extend the achievements in some easy fashion. We can make them for a bunch of core vim things, but there is bound to be something we don't know, or a plugin we don't include, so having an extensible system would be useful for that. Again, this isn't really needed as part of an initial system, more just a potentially nice extra.

I think that for granularity, for the basics, it seems appropriate to me to have individual ones, just to point them out more clearly.

@jordwalke
Copy link

Cool idea. The same UI elements could be repurposed for other things like tracking project source code TODO/FIXMEs etc.

I actually think opt out is better. In fact, have to condidered activating vim “easy mode” by default, with immediate “Upsells” to modal editing? No power vim user would mind adding one line to their Oni config to begin unlocking achievements.

@keforbes
Copy link
Collaborator

keforbes commented Dec 18, 2017

This first one is basically an entire feature in itself, but basically, if we notice the user uses h/j/k/l a lot and nothing else, maybe there can be some form of recommendation of "Do you want to try the movement achievements?", so the user knows to move on from the basic movements. Or even for an advanced user we could go "We've noticed you've never used X feature...Did you know about it?" This is a giant task in itself, but just a brain dump so its written down, since there is so much in vim I go "Why on earth didn't I know about that before!".

If we could do it, I actually like this idea of recommending the more advanced way of doing something rather than simply counting how many times a feature has been used. While I like reinforcing the muscle memory by using a feature multiple times, that won't help me discover new features to become more efficient at my task. I guess I'm just thinking that not every feature is applicable to all users. For example, maybe I use vim to traverse large files but I don't write code. I probably don't care to learn about the code-completion features. If I could learn the features that are important to me I would be more efficient at my job and I wouldn't care what else Vim can do.

I'm tempted to create a wiki page to see how many 'next step' recommendations we could come up with just because it'd be more collaborative than comments in an issue. Off the top of my head, here's what I'm thinking:
Use arrow keys a lot? Recommend h/j/k/l
Use lllllllll a lot to move down a line? Recommend w for jumping by word
Use wwww a lot to move down a line? Recommend W for jumping by whitespace
Use WWWW a lot to move down a line? Recommend $ for jumping to the end of a line
Use jjjjjjj a lot to move down a file? Recommend <c-f>/<c-d> for jumping. Or maybe { to jump by paragraphs.
Use xxxxx a lot to delete characters? Recommend dw or maybe text objects like diw and dt<x>

Those are all basic key inputs we could match against. But I'm not sure how we'd recognize "you manually typed the word you just deleted somewhere else" to recommend copy/paste or "you're performing the same steps repeatedly" to recommend . or :s/ or something similar. I'm curious how many simple <input> -> recommendation sets we could come up with before we need something like machine learning to recognize more advanced features. 😛

@badosu
Copy link
Collaborator

badosu commented May 21, 2018

@bryphe Perhaps we can close this issue now that we have the achievement pane?

Unless you want to track further progress on the feature.

@bryphe
Copy link
Member Author

bryphe commented May 23, 2018

@badosu - thanks! Makes sense to close this out as the core feature is there - we can track changes as separate issues.

@bryphe bryphe closed this as completed May 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants