You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The literal string "<leader>" is substituted for the leader key when repeating a command-line command using @: or @@. The result is that the command either errors or does something else than intended. The following will show the bug with two different leader keys. These were also tested on two environments, showing the same symptoms.
To Reproduce the bug in case with leader \ (backslash)
Steps to reproduce the behavior:
Go to vscode settings and search for "vim leader".
Find the option "What key should <leader> map to in remappings?", and set the leader key to \ (backslash).
Open a new text file and insert the sentence The quick brown fox jumps over the lazy dog. (using tabs rather than spaces), and save the file.
Try to replace tabs by spaces by doing command :s/\t/ (after the last / is a single space).
See the resulting string The quick brown fox jumps over the lazy dog. (It replaced the first tab by a space, as expected).
Try to repeat last command by @:.
See thrown error E486: Pattern not found: <leader>t.
Type : then arrow up to see most recent command, this reveals :s/<leader>t/ .
To Reproduce the bug in case with leader (one space)
Steps to reproduce the behavior:
Go to vscode settings and search for "vim leader".
Find the option "What key should <leader> map to in remappings?", and set the leader key to (one space).
Open a new text file and insert the sentence The quick brown fox jumps over the lazy dog. (using tabs rather than spaces), and save the file.
Try to replace tabs by spaces by doing command :s/\t/ (after the last / is a single space).
See the resulting string The quick brown fox jumps over the lazy dog. (It replaced the first tab by a space, as expected).
Try to repeat last command by @:.
See the resulting string The quick<leader>brown fox jumps over the lazy dog. (not the intended result, it replaced character \t by the string "<leader>").
Type : then arrow up to see most recent command, this reveals :s/\t/<leader>.
Repeately press @@
See the resulting string The quick<leader>brown<leader>fox<leader>jumps<leader>over<leader>the<leader>lazy<leader>dog..
Expected behavior (same for both cases)
Repeating the command with @: or @@ replaces a tab by a space each time it is used.
Environment 1:
Extension (VsCodeVim) version: v1.27.2
VSCode version: March 2024 (version 1.88)
OS: Windows 10
Environment 2:
Extension (VsCodeVim) version: v1.27.2
VSCode version: March 2024 (version 1.88)
OS: Ubuntu 22.04.4 LTS (Jammy Jellyfish)
The text was updated successfully, but these errors were encountered:
HenryTSZ
added a commit
to HenryTSZ/NVim
that referenced
this issue
Jun 13, 2024
Describe the bug
The literal string "
<leader>
" is substituted for the leader key when repeating a command-line command using@:
or@@
. The result is that the command either errors or does something else than intended. The following will show the bug with two different leader keys. These were also tested on two environments, showing the same symptoms.To Reproduce the bug in case with leader
\
(backslash)Steps to reproduce the behavior:
<leader>
map to in remappings?", and set the leader key to\
(backslash).The quick brown fox jumps over the lazy dog.
(using tabs rather than spaces), and save the file.:s/\t/
(after the last/
is a single space).The quick brown fox jumps over the lazy dog.
(It replaced the first tab by a space, as expected).@:
.E486: Pattern not found: <leader>t
.:
then arrow up to see most recent command, this reveals:s/<leader>t/
.To Reproduce the bug in case with leader
(one space)
Steps to reproduce the behavior:
<leader>
map to in remappings?", and set the leader key toThe quick brown fox jumps over the lazy dog.
(using tabs rather than spaces), and save the file.:s/\t/
(after the last/
is a single space).The quick brown fox jumps over the lazy dog.
(It replaced the first tab by a space, as expected).@:
.The quick<leader>brown fox jumps over the lazy dog.
(not the intended result, it replaced character\t
by the string "<leader>
").:
then arrow up to see most recent command, this reveals:s/\t/<leader>
.@@
The quick<leader>brown<leader>fox<leader>jumps<leader>over<leader>the<leader>lazy<leader>dog.
.Expected behavior (same for both cases)
Repeating the command with
@:
or@@
replaces a tab by a space each time it is used.Environment 1:
Environment 2:
The text was updated successfully, but these errors were encountered: