VSCodeVim / Vim

:star: Vim for Visual Studio Code
http://aka.ms/vscodevim
MIT License
14.02k stars 1.32k forks source link

Is there any way to remap the easymotion keys? #1481

Closed edasaki closed 7 years ago

edasaki commented 7 years ago

In vim I have the "Search Character" set to just s since I never really use the actual s in insert mode.

Is it possible to change the binding in vscodevim? I use the search a lot but pressing the leader twice is a bit tiring sometimes.

And kind of vaguely related, is it possible to change the red/orange font colors? I want to keep the black background but the red/orange is a bit hard to read for me.

johnfn commented 7 years ago

And kind of vaguely related, is it possible to change the red/orange font colors? I want to keep the black background but the red/orange is a bit hard to read for me.

It sounds like you're talking about theming VSCode, which is totally separate from VSCodeVim! Check here https://code.visualstudio.com/docs/getstarted/themes

edasaki commented 7 years ago

Oh sorry I realized that totally wasn't clear haha.

I was talking about the popups from the easymotion plugin

Is that also handled by VSCode themes? Since it seems like it's something that would be decided by vscodevim

johnfn commented 7 years ago

OHH, those themes! My bad! Yeah huh.. those should probably be re-themeable, sure.

To be honest, the unfortunate truth about extensions (e.g. EasyMotion) is that they're mostly community supported, as it's just too much effort for me to maintain both Vim and an extension ecosystem. You may be able to convince @xconverge if you ask really nicely, but that guy is pretty busy too haha. :P

xconverge commented 7 years ago

@edasaki we DO allow you to change the color

from here https://github.com/VSCodeVim/Vim#how-to-use-easymotion

"If you set vim.easymotionChangeBackgroundColor to true you can use the searchHightlightColor as the background color for the text decorations, however you then lose the red/orange indicators on whether it is a one key or two key combination since the font color needs to stay readable."

xconverge commented 7 years ago

I analyze the colors and then set the font to either white or black based on the search highlight color you use

FelikZ commented 7 years ago

Is it possible to change the binding in vscodevim?

{
        "vim.otherModesKeyBindingsNonRecursive": [
        {
            "before": ["s"],
            "after": ["leader", "leader", "s"]
        }]
}
edasaki commented 7 years ago

Thank you so much @FelikZ , that worked!

And thank you too @xconverge! That's fine for me

xconverge commented 7 years ago

There is 1 related bug that is somewhat funny though :) #1426, feel free to thumbs up it if it impacts you

Thanks

i-oliva commented 6 years ago

This doesn't work... has the command changed? :smile:

niamleeson commented 6 years ago

@pavilion https://github.com/VSCodeVim/Vim/issues/2755

smzm commented 5 years ago

This doesn't work... has the command changed? smile

Test this code.

"vim.normalModeKeyBindingsNonRecursive": [
    {
        "before": ["s"],
        "after": ["leader", "leader", "s"]
    }
]
rndware commented 4 years ago

What would the binding syntax be if you want to search by two chars?

<leader><leader> 2s <char><char>

mwanchap commented 4 years ago

@rndware

What would the binding syntax be if you want to search by two chars?

"vim.normalModeKeyBindingsNonRecursive": [
    {
        "before": ["f"],
        "after": ["leader", "leader", "2", "s"]
    }
]