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

"T" command in vintage mode does not accept a number argument #212

Open
skopjanecot opened this issue Jun 23, 2022 · 3 comments
Open

"T" command in vintage mode does not accept a number argument #212

skopjanecot opened this issue Jun 23, 2022 · 3 comments

Comments

@skopjanecot
Copy link

skopjanecot commented Jun 23, 2022

Description of the bug

In vintage mode, using the "T" command with a number argument (example: "2Ts") does not produce results associated with that command.
The bug as reported bellow in "additional information" is easily solvable, I am reporting so it can be adjusted in the default configuration.

Steps to reproduce

  1. Switch to vintage mode.
  2. Test the behavior listed bellow.

Expected behavior

"2Ts" moves the cursor backward to the second "s" in the line.

Actual behavior

It just moves back once to the first "s", the same as using the "Ts" command without the number argument.

Sublime Text build number

4126

Operating system & version

macOS 12.04

Additional information

EDIT: Jumped on the solution to fast, this just replicates the "F" command movement and doesn't move the cursor after the specified character. The bug does exist still.

Solved this bug by creating my custom keybinding which removes the "before": true argument from the motion arguments defined in Default.sublime-keymap from the Vintage package. By doing this, the command functions works as intended and is taking the number argument into account.

Original code for the "T" keybinding:

{ "keys": ["T", "<character>"], "command": "set_motion", "args": {
	"motion": "vi_move_to_character",
	"motion_args": {"extend": true, "forward": false, "before": true },
	"inclusive": true,
	"clip_to_line": true },
	"context": [{"key": "setting.command_mode"}]
},

With removed "before": true argument placed in the file parsed by Preferences: Key Binding:

{ "keys": ["T", "<character>"], "command": "set_motion", "args": {
        "motion": "vi_move_to_character",
        "motion_args": {"extend": true, "forward": false },
        "inclusive": true,
        "clip_to_line": true },
        "context": [{"key": "setting.command_mode"}]
},
@deathaxe
Copy link

Vintage plugin is maintained at https://github.com/sublimehq/Vintage. It appears rather unmaintained though. Maybe https://packagecontrol.io/packages/NeoVintageous is a better option.

@skopjanecot
Copy link
Author

It seems forgotten actually.
I browsed around other issues that were related to the vintage plugin after I submitted the bug yesterday and figured that I should move away from it. I installed NeoVintageous, it works fantastic at the moment and seems like an amazing package, incorporates many usefull vim plugins, etc. The problem is that it's not official and who know how long it will itself get maintened and updated with new ST4 releases.

@deathaxe
Copy link

The package seems to be updated quite frequently and its author has been quite active for several years. Even if maintenance would stop someone else could take over - it's open source.

ST heavily relies on plugins to adapt itself to certain workflows or use cases. There are only little to no "official" plugins. "Vintage" is indeed the only one and its left unmaintained for 10 years.

@BenjaminSchaaf BenjaminSchaaf transferred this issue from sublimehq/sublime_text Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants