Oni: Tutorial: "Target Practice" - Exercise `targets.vim` plugin that is bundled by default

Created on 31 Mar 2018  路  4Comments  路  Source: onivim/oni

A cool tutorial would be one that exercises one of our bundled default plugins:
https://github.com/wellle/targets.vim

As @CrossR suggested, the description would be an excellent place to make a special attribution to the author 馃憤

Warm-up with some of the default 'text objects':

  • ci"
  • ci(

And then start exercising some of the more in-depth text objects. I only use the basic ones, so it would be fun to build some muscle memory around some of the more involved ones. I'd like to get more proficient at nested pairs and last pair, for example. Part of the task will be designing the exercises here - we can always start small and add more!

A good starting point for this would be looking at some of the existing tutorials. One in particular that would be relevant might be: https://github.com/onivim/oni/blob/master/browser/src/Services/Learning/Tutorial/Tutorials/DeleteOperatorTutorial.tsx

We'd probably be leveraging the WaitForStateStage to detect if the modifications are correct and then use SetBufferStage to set up the next exercise.

enhancement good first issue help wanted insider

All 4 comments

I'd like to take a look at this. I'm new to contributing to open source so I might have a few hiccups along the way.

The code for this seems pretty straight forward after looking at other tutorial files, it's organizing all of the information that might take a few tries. I think following the same basic overview as the plugin's repo and providing a link to the repo for advanced features would work well. Something along these lines:

Intro
Pair text objects
Quote text objects
Separator text objects
Argument text objects
Explain second character options
Explain third character options
Conclusion

With the intro providing attribution to the author and the conclusion mentioning to go to the repo for advanced usage. I just learned about targets.vim with this issue but I believe that would give a basic overview of all its features.

Also, all of the tutorials in onivim are currently under a collapsible arrow labeled "Tutorials". It seems the current tutorials might belong under a "Basic" label and this new tutorial under a "Plugins" label. If this is desired then it might be a good idea to put these in their different sections now rather than having to come back and do it later.

Hi @nwneisen ,

I'd like to take a look at this. I'm new to contributing to open source so I might have a few hiccups along the way.

Wonderful! This would be a great change to start with 馃憤 Happy to help out if you hit any hiccups on the way. I'm personally really looking forward to this tutorial.

I think following the same basic overview as the plugin's repo and providing a link to the repo for advanced features would work well

With the intro providing attribution to the author and the conclusion mentioning to go to the repo for advanced usage. I just learned about targets.vim with this issue but I believe that would give a basic overview of all its features.

I'm on board, this looks like a solid progression - makes sense to follow the overview outline, as I'm sure there was a lot of thought put into it! Thanks for calling out the plan.

Also, all of the tutorials in onivim are currently under a collapsible arrow labeled "Tutorials". It seems the current tutorials might belong under a "Basic" label and this new tutorial under a "Plugins" label. If this is desired then it might be a good idea to put these in their different sections now rather than having to come back and do it later.

Yes, I like the idea of categorizing / splitting them out - might be good to have two separate PRs (one for the new tutorial, and one for the additional categories / label).

Thanks again for the help @nwneisen - let me know if you have questions! 馃憤

I've opened a pull request for this issue that can be found here:

2192

2192 has been merged in, closing issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zxiest picture zxiest  路  3Comments

Siilwyn picture Siilwyn  路  3Comments

tcoopman picture tcoopman  路  3Comments

nwaywood picture nwaywood  路  3Comments

TalAmuyal picture TalAmuyal  路  3Comments