Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Misdescription in tutorial section 3.5 #6231

Closed
zpah opened this issue Mar 9, 2023 · 7 comments
Closed

Misdescription in tutorial section 3.5 #6231

zpah opened this issue Mar 9, 2023 · 7 comments
Labels
A-documentation Area: Documentation improvements

Comments

@zpah
Copy link

zpah commented Mar 9, 2023

Version: helix-22.12

Tutorial section 3.5 give wrong result.

Quote from section 3.5:

  1. Move the cursor to the line marked '-->' below.
  2. Move to the F of FOO and type v2w to select the two words.
  3. Type d to remove the two words.

Sample line is:
' --> Remove the FOO BAR distracting words BAZ BIZ from this line.'

Expected result:
' --> Remove the distracting words BAZ BIZ from this line.'
Actual:
' --> Remove the FOOdistracting words BAZ BIZ from this line.'

Steps to reproduce:

  1. Type 324G move cursor at column 1 in line 324.
  2. Type 4wb (as described in Section 3.4) move cursor to the F and next type v2w (wrong selects ' BAR ').
  3. Type d erases ' BAR '.
@zpah zpah changed the title Misdescription or bug in tutorial section 3.5 Misdescription in tutorial section 3.5 or inconsistent UI/UX design Mar 9, 2023
@zpah zpah changed the title Misdescription in tutorial section 3.5 or inconsistent UI/UX design Misdescription in tutorial section 3.5 or inconsistent motion design Mar 9, 2023
@kirawi kirawi added the A-documentation Area: Documentation improvements label Mar 9, 2023
@justinlovinger
Copy link

Relevant comment: #1570 (comment). With the current behavior, the correct key sequence for this tutorial is wvw or ;v2w.

@zpah
Copy link
Author

zpah commented Mar 9, 2023

Thank you for response. It works right.

It would be nice to correct tutorial and explain that w, b, e commands is not suitable for motion and is not equivalent to j, k, l, h commands (and vim w, b, e commands) but used for selection only. Or change their behavior to more intuitive.

@justinlovinger
Copy link

w, b, and e can be used for movement. The issue is an inconsistency where only some motions select. If 2w selected two words, this tutorial could just be 2w without the ;v.

@zpah
Copy link
Author

zpah commented Mar 10, 2023

I agree with you about inconsistency of w and 2w (or any [count] w) selections.

But what about motions without selections?

For example, j, k, l, h does not select (motion only), but w, b, e selects (here their mutual inconsistency).
In other words, how to move through text objects (words, paragraphs, ...) without selections (h, j, or vim-style w, b, e) ?

@justinlovinger
Copy link

j, k, l, h selects the character moved over, a one-character selection. In Helix, something is always selected.

@zpah zpah changed the title Misdescription in tutorial section 3.5 or inconsistent motion design Misdescription in tutorial section 3.5 Mar 13, 2023
@zpah
Copy link
Author

zpah commented Mar 13, 2023

Thanks for your explanation. I was missing it.

But if you`re proposing that 2w should select two words, then and 2l, 2h, 2k, 2j should also select two characters (for consistency), shouldn`t it?

@justinlovinger
Copy link

Yes, for consistency, all motions should select characters traversed over. There is an old unresolved issue about this, #536, and keybinding are still being discussed in general.

@helix-editor helix-editor locked and limited conversation to collaborators Apr 11, 2024
@pascalkuthe pascalkuthe converted this issue into discussion #10352 Apr 11, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
A-documentation Area: Documentation improvements
Projects
None yet
Development

No branches or pull requests

3 participants