Vim icon indicating copy to clipboard operation
Vim copied to clipboard

How to go prev in `f` search when `,` is the leader key?

Open nshen opened this issue 5 years ago • 4 comments
trafficstars

How to go prev in f search when comma is the leader key? the timeout seems doesn't work for me.

nshen avatar May 28 '20 02:05 nshen

+1

In my vimrc, I use , as the leader key, and use \ to go prev in f search:

let mapleader = ','
noremap \ ,

When using this plugin in VSCode, I put this in my settings.json:

  "vim.leader": ",",
  "vim.normalModeKeyBindings": [
    {
      "before": ["\\"],
      "after": [","]
    }
  ]

the \ doesn't work in f search.

zkerhcy avatar Jun 22 '20 07:06 zkerhcy

@zkerhcy Give this a try "vim.normalModeKeyBindingsNonRecursive"

@nshen This could work, provided that you do not have easymotion enabled nnoremap <leader>, ,

sql-koala avatar Jul 15 '20 13:07 sql-koala

@zkerhcy Give this a try "vim.normalModeKeyBindingsNonRecursive"

I tried it and it doesn't work:

{
  "vim.leader": ",",
  "vim.normalModeKeyBindingsNonRecursive": [
    {
      "before": ["\\"],
      "after": [","],
    },
  ]
}

callistachang avatar Sep 12 '22 05:09 callistachang

https://github.com/VSCodeVim/Vim/commit/725dbbc5b34fbf5d8e24865e3cd6e616cfbc5e1c#diff-c9025b7738c54d06625e68c793a12e16ab2310e4df56e9c16e45883f5dea3c4aR128 This seems to be the reason. Not sure why it's like this. Maybe @J-Fields will have some input, and an idea of how to resolve it (which I can try to implement).

elazarcoh avatar Sep 14 '22 13:09 elazarcoh