Coder Social home page Coder Social logo

shadowndacorner / vscode-easymotion Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 2.0 88 KB

A simple VS Code extension that mimics EasyMotion for Vim

Home Page: https://marketplace.visualstudio.com/items?itemName=shadowndacorner.vscode-easymotion

License: MIT License

TypeScript 100.00%

vscode-easymotion's Introduction

EasyMotion for Visual Studio Code

This extension implements a simplified version of the EasyMotion plugin for Vim for VS Code. It supports jumping to the start and end of words based on the provided commands, as well as jumping to lines without words.

Usage

This extension provides the default key bindings alt+/ for jumping to a word and alt+shift+/ for jumping to the end of a word (as well as the ability to switch between search modes mid-serach - see the Search Modes section for detail). When jumping, simply use the highlighted keys to jump to the desired position.

By default, escape exits jump mode without changing the cursor position/selection.

While in jump mode, pressing backspace will undo the last character entered for the jump (eg if you want to jump to vf but instead type b, pressing backspace reveals the v characters again). If no characters have been entered, then it behaves in the same way as escape.

Search Modes

There are currently four search modes - searching for token starts, token ends, "inner words", and searching for all possible jump points. You can switch between the different modes with 1-4, or by using tab/shift+tab (by default) to iterate through them.

Commands

Command Default Keybinding
vscode-easymotion.jumpToWord alt+/
vscode-easymotion.jumpToEndOfWord alt+shift+/
vscode-easymotion.backspaceJumpMelody backspace
vscode-easymotion.cancelJump escape
vscode-easymotion.incrementSearchMode tab
vscode-easymotion.decrementSearchMode shift+tab

To change key bindings, simply reassign them in the Visual Studio Code Keybindings configuration (either by editing the JSON directly or in the UI).

Configuration Options

Aside from the configurable keybindings, this extension exposes the following configuration options...

Option Default Value Description
vscode-easymotion.allowJumpingToWordlessLines true When enabled, lines that do not contain any words will include a jump point at the end of the line

vscode-easymotion's People

Contributors

riotrah avatar shadowndacorner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

hrenx riotrah

vscode-easymotion's Issues

Illegible due to hard-coded tag/foreground color

Screenshot 2023-04-17 at 7 07 29 PM

This occurs due to the hardcoded tag color + light mode. Auto switching between light/dark modes is a popular, sorta recently available feature in vsc, so implementing support for this would be great.

I've seen/used various extensions that leverage mode-sensitive colors and as a user my fave config approach is as follows:

"vscode-easymotion.colors": {
    "dark": {
      "farForeground": "#FF0000",
      "nearForeground": "#FF0000"
    },
    "light": {
      "farForeground": "#FF0000",
      "nearForeground": "#FF0000"
    }
  }

or something like that.


Relevant APIs:

vscode.window.activeColorTheme: ColorTheme
vscode.window.activeColorTheme.kind: 'Dark' | 'HighContrast' | 'Light'

Maybe there's a way to simply make the colors an inversion of the background via CSS filters, but not sure if there is.

Thank you, and please keep forward for this extison. Cheers!

It's really is a very good extension, cheers! I hope there are will have more good features. I really like it, it's really good for someone who don't want to learn vim but want to use vim-easymotion, it allows me to use the mouse less and it's also very good for my recovery from cervical spondylosis.

How to avoid key binding issues with vscodevim?

Hi,

I also installed vscodevim extension. But it has key conflict.
If jumpToWord, it will show jump tag "h j k l" etc. but vscodevim already keys are already mapped those keys to vim cursor move.
How to resolve the above issue?
Kindly thanks for answering the question.

Thanks

Thank you, and please keep forward for this extison. Cheers!

Is really is a very good extension, cheers! I hope there are will have more good features. I really like it, it's really good for someone who don't want to learn vim but want to use vim-easymotion, it allows me to use the mouse less and is very good for my whiplash relief.

Combining VSCode Vim plugin with VSCode Easymotion

Greetings! I recently met this extension and I like the idea of it and appreciate the effort behind it.

I came up with an issue that would be nice if you could give it some of your time to see if there's any way to combine this two plugins as it would be the perfect efficiency combo.

There's already someone who thought the same as me in this opened issue in VSCode plugin repo and that I already commented about the behavior between this two plugins.

I've checked your plugin code but I'm no familiar with VSCode plugin programming so I don't know if this issue has something to do with your plugin behavior or the vscode vim plugin behavior so I apologize if it's not this plugin 'responsability', even if that's the case I would like to know what do you think about it. thanks.

Labels appear, but keypress don't jump - they enter the pressed keys as text

I have no idea when this started happening. But to be fair, I hadn't used the extension between when I opened #5 and until a couple weeks ago when I noticed this, but was too busy to open this ticket. I'll try using the version before my PR to see if it broke something (tho when testing that PR locally, seemed to work fine ๐Ÿคท๐Ÿฝ )

Update: can confirm v0.0.7 works

Screencap:

Screen.Recording.2023-05-25.at.3.51.40.PM.mov

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.