-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Tutorial for Helix akin to vimtutor
#537
Conversation
Should it create a new file with the tutorial in it and then open it in the editor, or just load the tutorial into a buffer without a filename? It seems that in order to do the latter I'd have to create a method on |
What if you put the file in the runtime folder? Then you'd be able to load it via runtime_dir() and it wouldn't need embedding in the binary. |
Ah, yeah, I could do that. But my question still stands, as the user shouldn't directly access the file since the tutorial involves editing it. Should the file be copied somewhere or should its contents just be loaded into a buffer without a filename? |
You could copy it into |
I think you might have misread. I'm not worrying about the user editing the file when they're not supposed to, the tutorial actually instructs the user to edit the buffer in order to help with teaching, meaning that the original file definitely shouldn't be opened. |
Yeah, if the file is chmodded to read-only they'll be able to edit it in helix but unable to change any of the changes to disk. That way the original file stays intact. |
Ah, okay. |
But if someone installs from source, they'd have to chmod it as readonly themself. I'd rather leave the file in the runtime folder, but instead of opening it normally, load it into a buffer without linking it to the filename. Vimtutor copies the file and opens the copy in Vim, but I think creating a new file isn't really necessary. |
So far this looks good to me. The text is really clear, and seems like a good introduction to the basics. |
Should we merge this as is? I think it's a good start and we can add more sections in a follow up. |
If we decide to do that I'd probably want to add a note at the end that the tutorial is a WIP. |
I'm okay with that, better to have a partial tutorial in the next release than none at all :) (I'm hoping to cut a new release after a few more fixes land) |
We can add a TODO which is better. |
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.
Good work. A good start and could be improved later on, at least selections part should be there later on.
Addresses #506.
Most of what I have so far is practically the same as Vimtutor, but it will eventually diverge once I reach multiple Helix-specific topics such as multiple selections. I will need to implement actually opening the tutorial using
hx --tutor
and/or:tutor
from within the editor.