flash.nvim icon indicating copy to clipboard operation
flash.nvim copied to clipboard

bug: comma not working with f F t T motions

Open SpacewaIker opened this issue 2 years ago • 2 comments

Did you check docs and existing issues?

  • [X] I have read all the flash.nvim docs
  • [X] I have searched the existing issues of flash.nvim
  • [X] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.9.4

Operating system/version

Windows 11 23H2

Describe the bug

When using the f, F, t, T motions, I can use the semicolon to go to the next match, but the comma doesn't work. After moving around, the semicolon will also work to re-trigger the motion, but not the comma key. With the plugin disabled, the normal f F t T work with the comma as expected.

Steps To Reproduce

  1. Search for a character with f a
  2. Press ; to go to the next match
  3. Press ,, but nothing happens

Expected Behavior

The comma key should go to the previous match.

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  { "folke/flash.nvim", opts = {} },
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

SpacewaIker avatar Dec 23 '23 19:12 SpacewaIker

I had the same issue but I found out that it was caused by

vim.g.maplocalleader = ','

Removing this then , works again :)

uduse avatar Dec 31 '23 19:12 uduse

I thought of this but temporarily setting my local leader to something else didn't work, and I couldn't find a line setting the local leader to ',' anywhere in my config...

SpacewaIker avatar Dec 31 '23 19:12 SpacewaIker

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jul 06 '24 01:07 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Jul 13 '24 01:07 github-actions[bot]