Skip to content
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

DI Commands not working #40

Open
theshatterstone opened this issue Aug 6, 2024 · 5 comments
Open

DI Commands not working #40

theshatterstone opened this issue Aug 6, 2024 · 5 comments
Labels
keybindings VIM keybindings

Comments

@theshatterstone
Copy link

theshatterstone commented Aug 6, 2024

Summary

What's wrong:
Helix uses the default colourscheme and seemingly acts as itself rather than as it should be. (EDIT: The colourscheme issue seems to already exist as #8 ) And yet, some changes are there (w and b for movements, VIS instead of SEL, etc). Can confirm that the helix config as been removed, then replaced with an empty file and so far it didn't change anything.
(EDIT: This entire issue seems to be related to #29 but also, the first line of the log when running with RUST_BACKTRACE=1, seems to indicate Evil mode is not enabled and it somehow should be? Though the README doesn't mention anything of the sort)

Reproduction Steps

I tried this:

  1. hx file.txt
  2. www
  3. bbb
  4. jjjjjj
  5. diw
  6. di"
  7. di[
  8. di]

I expected this to happen:

I was focused on code in the format:

os.environ["XCURSOR_SIZE"] = "24"

I was specifically tried focusing on different characters within XCURSOR_SIZE so I'd be inside the "" and inside the [] and I tried to Delete Inside "" and Delete Inside [], for the [] I tried both di[ and di]. I can confirm it wasn't a caps lock issue as when I tried i for insert mode, I went into insert mode. After toggling caps lock again, and pressing i, I went to the beginning of the line so it wasn't a caps lock issue. When I was trying the delete inside commands, I had the d and i showing and detected at the right on the bottom line (the one under the modeline, I believe it's called the status line).

Of course, I expected to get the text deleted but upon pressing any of " [ or ], I got a "Command Interrupted" in the status line. The diw or Delete Inside Word, seems to work, however.

NOTE: I should mention I tried installing the latest version from the releases page (20240716) as well as the previous one (20240618) and had the same result.

Helix log

(It was an empty file, below is the result with RUST_BACKTRACE=1 as mentioned in the bug report issue form)

2024-08-06T17:57:45.109 helix_term::config [INFO] Evil mode not set in local/global config
2024-08-06T17:57:45.125 globset [DEBUG] glob converted to regex: Glob { glob: "/Dockerfile.", re: "(?-u)^./Dockerfile\..$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('D'), Literal('o'), Literal('c'), Literal('k'), Literal('e'), Literal('r'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-08-06T17:57:45.125 globset [DEBUG] glob converted to regex: Glob { glob: "/dockerfile.", re: "(?-u)^./dockerfile\..$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('d'), Literal('o'), Literal('c'), Literal('k'), Literal('e'), Literal('r'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-08-06T17:57:45.125 globset [DEBUG] glob converted to regex: Glob { glob: "/Containerfile.", re: "(?-u)^./Containerfile\..$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('C'), Literal('o'), Literal('n'), Literal('t'), Literal('a'), Literal('i'), Literal('n'), Literal('e'), Literal('r'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-08-06T17:57:45.125 globset [DEBUG] glob converted to regex: Glob { glob: "/containerfile.", re: "(?-u)^./containerfile\..$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('c'), Literal('o'), Literal('n'), Literal('t'), Literal('a'), Literal('i'), Literal('n'), Literal('e'), Literal('r'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-08-06T17:57:45.125 globset [DEBUG] glob converted to regex: Glob { glob: "/.ignore", re: "(?-u)^./\..ignore$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('.'), ZeroOrMore, Literal('i'), Literal('g'), Literal('n'), Literal('o'), Literal('r'), Literal('e')]) }
2024-08-06T17:57:45.125 globset [DEBUG] glob converted to regex: Glob { glob: "
/BUILD.
", re: "(?-u)^./BUILD\..$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('B'), Literal('U'), Literal('I'), Literal('L'), Literal('D'), Literal('.'), ZeroOrMore]) }
2024-08-06T17:57:45.125 globset [DEBUG] glob converted to regex: Glob { glob: "/.env.", re: "(?-u)^./\.env\..$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('.'), Literal('e'), Literal('n'), Literal('v'), Literal('.'), ZeroOrMore]) }
2024-08-06T17:57:45.125 globset [DEBUG] glob converted to regex: Glob { glob: "/.envrc.", re: "(?-u)^./\.envrc\..$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('.'), Literal('e'), Literal('n'), Literal('v'), Literal('r'), Literal('c'), Literal('.'), ZeroOrMore]) }
2024-08-06T17:57:45.125 globset [DEBUG] glob converted to regex: Glob { glob: "/conf//.{inc,conf}", re: "(?-u)^./conf/./.\.(?:conf|inc)$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('c'), Literal('o'), Literal('n'), Literal('f'), Literal('/'), ZeroOrMore, Literal('/'), ZeroOrMore, Literal('.'), Alternates([Tokens([Literal('c'), Literal('o'), Literal('n'), Literal('f')]), Tokens([Literal('i'), Literal('n'), Literal('c')])])]) }
2024-08-06T17:57:45.125 globset [DEBUG] glob converted to regex: Glob { glob: "/Jenkinsfile.", re: "(?-u)^./Jenkinsfile\..$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('J'), Literal('e'), Literal('n'), Literal('k'), Literal('i'), Literal('n'), Literal('s'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-08-06T17:57:45.125 globset [DEBUG] built glob set; 1 literals, 0 basenames, 0 extensions, 0 prefixes, 124 suffixes, 8 required extensions, 10 regexes
2024-08-06T17:57:45.127 helix_view::clipboard [DEBUG] Using wl-copy+wl-paste to interact with the system and selection (primary) clipboard
2024-08-06T17:57:45.128 helix_tui::backend::crossterm [DEBUG] The keyboard enhancement protocol is supported in this terminal (checked in 124.879µs)
2024-08-06T17:57:45.128 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-08-06T17:57:45.378 helix_term::application [DEBUG] received editor event: IdleTimer
2024-08-06T17:57:46.422 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-08-06T17:57:46.650 helix_term::commands::typed [DEBUG] quitting...
2024-08-06T17:57:46.650 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-08-06T17:57:46.672 helix_term::application [DEBUG] received editor event: IdleTimer
2024-08-06T17:57:46.812 helix_term::commands::typed [DEBUG] quitting...
2024-08-06T17:57:46.812 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-08-06T17:57:46.812 helix_term::job [DEBUG] waiting on jobs...
2024-08-06T17:57:46.812 helix_term::job [DEBUG] waiting on jobs...

Platform

Linux (amd64)

Terminal Emulator

foot version: 1.17.2

Installation Method

releases page, as described in the Installation Section of the README

Helix Version

evil-helix (2dc286a, helix 24.3)

@theshatterstone theshatterstone changed the title Borked version/installation? DI Commands not working Aug 6, 2024
@usagi-flow usagi-flow added the keybindings VIM keybindings label Aug 6, 2024
@usagi-flow
Copy link
Owner

Thank you for the detailed info!

I can indeed confirm that diw works, but di", di[ and di] don't work yet, much like cf( as you correctly noted.

That's because the "inner word" modifier (i) is implemented, but the "find char" modifier (f) is not. And then we have these dynamic motion keys like " and [ which do not denote a motion in this context, but rather a parameter for the modifier. This needs to be implemented as well.

I'm putting these pretty high up on my personal TODO list, because I also consider these important "core" Vim behavior.

@theshatterstone
Copy link
Author

@usagi-flow Alright, thank you! Also, what is the "Evil mode not set in local/global config" about? Is there anything I did wrong? That's the main thing I was curious about.

@usagi-flow
Copy link
Owner

Ahh yes, I realize that may be a bit confusing: It basically says that you didn't explicitly enable or disable evil-mode anywhere. The idea behind that is that users can, if they wish so, completely disable the modifications of this fork and start "vanilla" Helix without needing another build.

So the tl;dr is that you can safely ignore the message.

I'll extend the log message a bit (to something like "Evil mode not explicitly set in local/global config, will enable by default") and definitely change the log level to Debug, because under normal circumstances, the message has no value for the user.

@theshatterstone
Copy link
Author

Great! But wouldn't it be helpful to add this to the README, so people know they can switch back to regular helix and how to do that in the config?

@usagi-flow
Copy link
Owner

Good idea, I was just about to merge some clarifications, might as well add that to the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keybindings VIM keybindings
Projects
None yet
Development

No branches or pull requests

2 participants