Vim: Is there any way to remap the easymotion keys?

Created on 6 Apr 2017  路  13Comments  路  Source: VSCodeVim/Vim

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.

Most helpful comment

Is it possible to change the binding in vscodevim?

{
        "vim.otherModesKeyBindingsNonRecursive": [
        {
            "before": ["s"],
            "after": ["leader", "leader", "s"]
        }]
}

All 13 comments

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

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

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

@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."

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

Is it possible to change the binding in vscodevim?

{
        "vim.otherModesKeyBindingsNonRecursive": [
        {
            "before": ["s"],
            "after": ["leader", "leader", "s"]
        }]
}

Thank you so much @FelikZ , that worked!

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

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

Thanks

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

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

Test this code.

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

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

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

@rndware

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

"vim.normalModeKeyBindingsNonRecursive": [
    {
        "before": ["f"],
        "after": ["leader", "leader", "2", "s"]
    }
]
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ACollectionOfAtoms picture ACollectionOfAtoms  路  3Comments

spinningarrow picture spinningarrow  路  3Comments

orn688 picture orn688  路  3Comments

edwintorok picture edwintorok  路  3Comments

st-schneider picture st-schneider  路  3Comments