-
Notifications
You must be signed in to change notification settings - Fork 75
Description
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
- Switch to vintage mode.
- 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"}]
},