Vim: Support `s` mapping for EasyMotion to any surrounding word

Created on 24 May 2017  路  8Comments  路  Source: VSCodeVim/Vim

  • Click thumbs-up 馃憤 on this issue if you want it!
  • Click confused 馃槙 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


FEATURE REQUEST (choose one):

Environment:

  • VSCode Version: 1.12.2
  • VsCodeVim Version: .7.1
  • OS: MacOS
    Request:

I would REALLY like to map my s key to search forward AND backwards. I should be able to jump to any word and LINE BREAKS (please start including \n like normal EasyMotion does) with two-three characters.

I am currently using easymotion with VIM and this is a huge deal for me and a lot of people I know.

arenot-vim-core kinfeature

Most helpful comment

@fourcolors Unfortunately, bidirectional word motion is not supported so far, but it is easy to implement this, so I will work it on 馃憤

Basically search is done over the entire file, but the length of characters used for label name are 28, so 784(=28x28) labels shown at most.

All 8 comments

I'm thinking that Easymotion might be another good target for neovim integration. I'd rather not reimplement the entirety of EasyMotion again... I've opened up an issue here to ask about it: https://github.com/easymotion/vim-easymotion/issues/331

@Chillee right now you can't seem to get Neovim to do the easymotion thing, can you? Unless I'm mistaken.

@fourcolors Correct. EasyMotion does a bunch of hacks that make it difficult to integrate. @MaxfieldWalker has been on a tear implementing new EasyMotion features, so you might want to check some of the new features he's implemented out and see if they cover some of your use cases.

@fourcolors You can now map a single character to a easymotion action in the latest version of the extension with configuration like below.

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

@MaxfieldWalker Is it possible to make s do a search for the entire file I'm working in, basically adding a label for every word both ways? This is how I have it set up in VIM.

Basically, I just type s and it will auto search and label each word in the file, no need to search.

Also, search doesn't seem to search the whole file?

basically i'm looking for this mapping nmap s <Plug>(easymotion-bd-w)

@fourcolors Unfortunately, bidirectional word motion is not supported so far, but it is easy to implement this, so I will work it on 馃憤

Basically search is done over the entire file, but the length of characters used for label name are 28, so 784(=28x28) labels shown at most.

@fourcolors Is this still an issue?

basically i'm looking for this mapping nmap s <Plug>(easymotion-bd-w)

This can already be done with <leader><leader><leader>bdw and you can map s to this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

triztian picture triztian  路  3Comments

waltiam picture waltiam  路  3Comments

cckowin picture cckowin  路  3Comments

spinningarrow picture spinningarrow  路  3Comments

ghost picture ghost  路  3Comments