[vim/vim] Port the tutor plugin from neovim (#6414)

55 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Jul 6, 2020, 9:34:52 PM7/6/20
to vim/vim, Subscribed

The github page for this plugin is at

https://github.com/fmoralesc/vim-tutor-mode

A slightly modified version of this is included in neovim. I have ported over
the plugin to Vim (with slight modifications).


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/6414

Commit Summary

  • Port the tutor plugin from neovim

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

codecov[bot]

unread,
Jul 6, 2020, 10:04:10 PM7/6/20
to vim/vim, Subscribed

Codecov Report

Merging #6414 into master will decrease coverage by 0.61%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@

##           master    #6414      +/-   ##

==========================================

- Coverage   88.11%   87.50%   -0.62%     

==========================================

  Files         144      143       -1     

  Lines      159156   158310     -846     

==========================================

- Hits       140243   138523    -1720     

- Misses      18913    19787     +874     
Impacted Files Coverage Δ
src/libvterm/src/rect.h 0.00% <0.00%> (-96.56%) ⬇️
src/libvterm/src/state.c 49.41% <0.00%> (-40.58%) ⬇️
src/libvterm/include/vterm.h 0.00% <0.00%> (-37.50%) ⬇️
src/libvterm/src/keyboard.c 51.57% <0.00%> (-36.85%) ⬇️
src/libvterm/src/pen.c 50.73% <0.00%> (-33.93%) ⬇️
src/libvterm/src/encoding.c 44.55% <0.00%> (-27.73%) ⬇️
src/libvterm/src/vterm.c 48.13% <0.00%> (-18.54%) ⬇️
src/libvterm/src/parser.c 84.31% <0.00%> (-10.79%) ⬇️
src/libvterm/src/mouse.c 41.66% <0.00%> (-6.67%) ⬇️
src/ui.c 79.83% <0.00%> (-3.82%) ⬇️
... and 30 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 007f9d6...7d14113. Read the comment docs.

Bram Moolenaar

unread,
Jul 7, 2020, 6:32:15 AM7/7/20
to vim/vim, Subscribed

So, at least part of this comes from the plugin from Felipe Morales? Please ask him to put a license on his work. Without a license we are not allowed to use it. The Vim license would be best, like it applies to most of the runtime code.

Yegappan Lakshmanan

unread,
Jul 7, 2020, 10:07:26 AM7/7/20
to vim_dev, reply+ACY5DGDKVVPM2BQ45W...@reply.github.com, vim/vim, Subscribed
Hi Bram,

On Tue, Jul 7, 2020 at 3:32 AM Bram Moolenaar <vim-dev...@256bit.org> wrote:

So, at least part of this comes from the plugin from Felipe Morales? Please ask him to put a license on his work. Without a license we are not allowed to use it. The Vim license would be best, like it applies to most of the runtime code.



I reached out to Felipe Morales about the license. He has now added a
LICENSE file to the repository with reference to the Vim license.


Regards,
Yegappan

vim-dev ML

unread,
Jul 7, 2020, 10:07:44 AM7/7/20
to vim/vim, vim-dev ML, Your activity

Yegappan Lakshmanan

unread,
Jul 7, 2020, 11:26:27 AM7/7/20
to vim/vim, vim-dev ML, Push

@yegappan pushed 1 commit.

  • 607b8ea Add reference to the 'Modern Vim' book


You are receiving this because you are subscribed to this thread.

View it on GitHub or unsubscribe.

Bram Moolenaar

unread,
Jul 7, 2020, 3:21:04 PM7/7/20
to vim...@googlegroups.com, Yegappan Lakshmanan, reply+ACY5DGDKVVPM2BQ45W...@reply.github.com
Great, that was quick.

Now we need to find out what in the current vimtutor is missing from
this plugin implementation.

--
Article in the first Free Software Magazine: "Bram Moolenaar studied
electrical engineering at the Technical University of Delft and
graduated in 1985 on a multi-processor Unix architecture."
Response by "dimator": Could the school not afford a proper
stage for the ceremony?

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

vim-dev ML

unread,
Jul 7, 2020, 3:21:24 PM7/7/20
to vim/vim, vim-dev ML, Your activity

Bram Moolenaar

unread,
Jul 4, 2022, 10:46:23 AM7/4/22
to vim/vim, vim-dev ML, Comment

I finally found some time to look at this. I have my doubts if this is better than the existing vimtutor. It looks nicer, but it also uses several mechanisms that take it away from "raw" Vim. The tutor is especially made in a way that users can play around with the commands. There should not be any surprises, such as hidden text (conceal mode is used) and signs popping up depending on what the text looks like.

Does someone have experience with giving this tutor to actual new Vim users? A teacher perhaps.

Unless there is a clear advantage, I rather stick with the "old boring" tutor, since it has worked fine for a long time.


Reply to this email directly, view it on GitHub.
You are receiving this because you commented.Message ID: <vim/vim/pull/6414/c1173902133@github.com>

Yegappan Lakshmanan

unread,
Jul 4, 2022, 2:53:08 PM7/4/22
to vim_dev, reply+ACY5DGFBFBB4AAWHSK...@reply.github.com, vim/vim, vim-dev ML, Comment
On Mon, Jul 4, 2022 at 7:46 AM Bram Moolenaar <vim-dev...@256bit.org> wrote:

I finally found some time to look at this. I have my doubts if this is better than the existing vimtutor. It looks nicer, but it also uses several mechanisms that take it away from "raw" Vim. The tutor is especially made in a way that users can play around with the commands. There should not be any surprises, such as hidden text (conceal mode is used) and signs popping up depending on what the text looks like.

Does someone have experience with giving this tutor to actual new Vim users? A teacher perhaps.


Can anyone try the new tutor and give some feedback?


Thanks,
Yegappan

vim-dev ML

unread,
Jul 4, 2022, 2:53:29 PM7/4/22
to vim/vim, vim-dev ML, Your activity

On Mon, Jul 4, 2022 at 7:46 AM Bram Moolenaar ***@***.***>


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/6414/c1174078801@github.com>

Nick Jensen

unread,
Jul 4, 2022, 7:29:32 PM7/4/22
to vim/vim, vim-dev ML, Comment

I've had a play with it. The makefile doesn't currently install the actual initial tutor (runtime/tutor/en/vim-01-beginner.tutor) so entering :Tutor in vim results in this error: "No tutorial with that name found". After moving the files to the expected location it runs well.

I do think that using this tutor is a much more pleasant experience than the standard vimtutor, and the signs changing from a red ✗ to a green ✓ when you've matched a line is nice feedback. However I also agree with Bram that the tutor should be simple, and there are some things that might be confusing due to use of conceal. For example, learning to use hjkl as the first first lesson and moving around a line becomes a bit confusing when you try to navigate over the links in "Lesson 0", as l appears to do nothing for a while (the cursor is moving over the concealed ](holy-grail ) part of [like this](holy-grail )).

There are also some bugs:

  1. After completing section 3.1 (deleting and putting lines with dd and p) the signs no longer match up with the lines:
    image
    Actually after further testing I realise that this only happens if the 4th line is deleted. But after doing that and causing this issue:
  2. In lesson 3.2 the X does not become a checkmark after correcting the line:
    image
    Note that this works correctly unless the section 3.1 error has been triggered.

I didn't test further. Overall it seems like a good idea to me but might need to be more robust?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you commented.Message ID: <vim/vim/pull/6414/c1174457579@github.com>

Nick Jensen

unread,
Jul 4, 2022, 7:45:02 PM7/4/22
to vim/vim, vim-dev ML, Comment

I didn't test further. Overall it seems like a good idea to me but might need to be more robust?

Having said this, the original tutor is still there, so someone following a 10 year old recommendation to run "vimtutor" from the command line will still see the normal old tutor - which is good. Having this version as an optional plugin is a nice addition.


Reply to this email directly, view it on GitHub.
You are receiving this because you commented.Message ID: <vim/vim/pull/6414/c1174462242@github.com>

依云

unread,
Jul 4, 2022, 11:55:21 PM7/4/22
to vim/vim, vim-dev ML, Comment

I don't like the new tutor (but it's only my opinion; I'm not a teacher).

  • The concealed text is indeed annoying and confusing.
  • With those check marks, it feels more like a test than a tutorial. The user tends to complete them rather than explore what they can do with the thing they just learned. When I read such tutorials (Vim's old one, an Emacs one, and a helix one) I tend to try operations that the text doesn't tell me to do and understand the result. The check marks discourage this.
  • Too many fancy stuff. The user will wonder how it's implemented since the tutorial itself is a text buffer in the editor. The plain text one will make the user focus on the basics it's teaching.
  • The first page doesn't teach how to move cursors. The new user won't be able to read further without other materials.
  • It uses existing config files, so that the behavior may be different than what the tutorial says. Those config files can be installed by a system admin on a shared machine, or by the user with OS package managers, or the OS tries to ship some "sane default" config, or the user followed a tutorial to install a customized suite but now they want to learn the basics.
  • There is no translation yet (but this could be improved later).


Reply to this email directly, view it on GitHub.
You are receiving this because you commented.Message ID: <vim/vim/pull/6414/c1174577084@github.com>

Bram Moolenaar

unread,
Jul 5, 2022, 8:51:39 AM7/5/22
to vim...@googlegroups.com, Nick Jensen

> > I didn't test further. Overall it seems like a good idea to me but
> > might need to be more robust?

The table uses line numbers, thus when inserting or deleting lines they
are no longer valid. Not sure what would be a good way to avoid this.

> Having said this, the original tutor is still there, so someone
> following a 10 year old recommendation to run "vimtutor" from the
> command line will still see the normal old tutor - which is good.
> Having this version as an optional plugin is a nice addition.

It is certainly possible to make this available as a separate plugin.
It could even be mentioned in the user manual. Or plugin managers can
mention it as the first plugin to use.

--
hundred-and-one symptoms of being an internet addict:
55. You ask your doctor to implant a gig in your brain.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///

Yegappan Lakshmanan

unread,
Jul 5, 2022, 11:52:37 AM7/5/22
to vim/vim, vim-dev ML, Push

@yegappan pushed 2 commits.

  • 53a420a Port the tutor plugin from neovim
  • ff34c82 Add reference to the 'Modern Vim' book

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/6414/push/10352051026@github.com>

Christian Brabandt

unread,
Nov 3, 2024, 5:05:08 AM11/3/24
to vim/vim, vim-dev ML, Comment

I include this as an optional plugin. Thanks all


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you commented.Message ID: <vim/vim/pull/6414/c2453368111@github.com>

Christian Brabandt

unread,
Nov 3, 2024, 5:05:27 AM11/3/24
to vim/vim, vim-dev ML, Comment

Closed #6414 via a54816b.


Reply to this email directly, view it on GitHub.
You are receiving this because you commented.Message ID: <vim/vim/pull/6414/issue_event/15095074832@github.com>

Reply all
Reply to author
Forward
0 new messages