Git Product home page Git Product logo

vscode-jumpy's Introduction

Jumpy Extension for Visual Studio Code

Feature Overview

Jumpy provides fast cursor movement, inspired by Atom's package of the same name.

jumpy-preview

Commands

When Jumpy is activated, decorations (two-letter codes) are created in the area around your cursor. Then simply type in a two letter code to jump to that position.

Where the decorations are created is dependent on the command you use:

  • extension.jumpy-word (Jumpy Word Mode): creates decorations for words in the area around your cursor
  • extension.jumpy-line (Jumpy Line Mode): creates decorations for non-empty lines in the area around your cursor

No default keybindings have been provided with this extension to avoid conflicts. Instructions for setting up your own keybindings are here

To exit Jumpy mode, press a non-a-z key such as space or enter.

To set up the keybindings like Atom (Shift+Enter), add the following to your keybindings.json (File/Code -> Preferences -> Keyboard Shortcuts):

    {
        "key": "shift+enter",
        "command": "extension.jumpy-word",
        "when": "editorTextFocus"
    }

You can also set up a special keybinding to exit Jumpy mode, for example ESC:

    {
        "key": "Escape",
        "command": "extension.jumpy-exit",
        "when": "editorTextFocus && jumpy.isJumpyMode"
    }

Settings

Jumpy settings can be configured by adding entries into your settings.json (File -> Preferences -> User Settings). The following settings are available:

"jumpy.wordRegexp": The Regexp to use to match words in Jumpy Word Mode. The default is "\\w{2,}" which matches a string of characters [A-Za-z0-9_], length two or more. To match individual words inside camel case, for example, override with "([A-Z]+([0-9a-z])*)|[a-z0-9]{2,}".

"jumpy.lineRegexp": The Regexp to use to match empty lines (Jumpy won't create decorations for empty lines). The default is "^\\s*$"

"jumpy.fontFamily": Font used in Jumpy decorations, defaults to font from settings

"jumpy.fontSize": Font size used in Jumpy decorations, defaults to font size from settings - 1

"jumpy.darkThemeBackground": Background of Jumpy decoration in dark themes

"jumpy.darkThemeForeground": Text color of Jumpy decoration in dark themes

"jumpy.lightThemeBackground": Background of Jumpy decoration in light themes

"jumpy.lightThemeForeground": Text color of Jumpy decoration in light themes

Support

Create an issue

vscode-jumpy's People

Contributors

alefragnani avatar andrejgajdos avatar stormherz avatar wmaurer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-jumpy's Issues

add hint height

please add the ability to change the size of two-letter hits via setting.json

Extension issue

  • Issue Type: Bug
  • Extension Name: vscode-jumpy
  • Extension Version: 0.3.1
  • OS Version: Windows_NT x64 6.1.7601
  • VSCode version: 1.38.1
{
	"messages": [],
	"activationTimes": {
		"startup": false,
		"codeLoadingTime": 213,
		"activateCallTime": 385,
		"activateResolvedTime": 15336,
		"activationEvent": "onLanguage:java"
	},
	"runtimeErrors": []
}

Jumpy assigns letters to folded code

I have a long function that I folded. When I try to jump from before-the-function to after-the-function, jumpy assigns letters to words in the folded function, and thus no letters are assigned to words after-the-function.

Example (here folded function -> folded part, jumping from the first part, want to jump to the third part)
image

Keybindings?

Would you have a sample Keybindings.json to show how the commands are hooked up in VS Code?

[Feature request] Alternative numbers mode

How about alternative jumpy mode where user should press numbers instead of letters?

I think it would be easier, for some people like me, to type 12 instead of e.g. at.
I have a numpad on my keyboard so I don't have to be distracted from the editor. Let it be more that two characters to type, if needed, there shouldn't be any problems (I think).

And thanks for the great extension for the great code editor! ;-)

why does not work property "jumpy.fontSize" and so on?

I tried add property of "jumpy.fontSize", "jumpy.fontFamily" and so on, but it doesn't work(i copied documents of readme.).
how can i work these property?

{
    "jumpy.fontFamily": "Consolas",
    "jumpy.fontSize": 15,
    "jumpy.darkThemeBackground": "yellow",
    "jumpy.darkThemeForeground": "yellow"
}

doesntwork

Update available when it's not

I just updated from 0.0.1 to 0.0.2. VSCode says there is an update but updating does not install a version over 0.0.2.

I've tried uninstalling, reinstalling and restarting VSCode but no change.

Environment
Windows 10 x64
Visual Studio Code 1.5.3

Padding?

Greetings!

Is there any way to change padding between foreground and background?

It looks not readable:
image

lineRegexp behaves strange

I need help with understanding of lineRegexp in jumpy. I want it to match start of each line, including empty lines, and end of each line. But no matter how i tried i couldn't succed in that, so i was forced to put match of end line into wordRegexp, which makes it a bit messy. Help me, please

Make font size adjustable

It would be nice to adjust the font size of the letters. I'm using a higher resolution display and it's very hard to make out the letters, especially similar looking ones like 'c' and 'e'.

Thanks!

screen shot 2018-03-30 at 3 06 40 pm

Auto center editor window after jump

It would be great feature to add. Now I'm using 'Center Editor Window' extension after each jump,
it would be nice to have a setting which automatically doing it.
Ready to help with contribution on this one.

Should work with Vim emulation

I was using vscodevim vim emulation, and Jumpy doesn't work with it. The command for jumpy-word correctly opens the decorators, but pressing the two-letter code will send commands to vim, and not to jumpy at all, no matter what mode I am in vim.

Jumpy doesn't not jump on another layout OR on another file

Hi ,

As we see the Jumpy in atom , It jumps anywhere in all files which are visible to us , but in VS code it jumps only in current file . If there is another way to jump on other files too.. Please let me know , Your valuable comments are appreciated .

Neighbor letters for combinations

Hi
It would be more practical and efficient if the 2 letter combinations would consist of letters that are neighbor to each other

[Feature Request] Integrate jumpy with Go To Line

So i already replace Go To Line keystone (Ctrl + G) with jumpy, but when i want to jump to a specific line, i must remember alternative Go To Line keystone (and sometimes i miss press it with jumpy keystone).
So here is my suggestion: Integrate jumpy with Go To Line. When we press 2 characters, it works normally, but when we press digit, it go to specific line.
If user press first digit, it will waiting for second digit ( or if the file is more than 100 lines, it will wait for third digit...), but if they press ⏎, it will go to single-digit line (0-9)

Setting for changing the keymay/keyboard layout for letter code generation

I noticed that the letter codes seemed to follow an asdfg... pattern similar to home row on the QWERTY keyboard, not everyone uses this, inefficient, layout; both dvorak and colemack are popular; and on mac the dvorak-⌘QWERTY is also possible.

This request similar to #33; but in this case a default for each layout (min QWERTY, and dvorak) would be preferred. Full customization is what #33 seems to be about.

In anycase taking the keymap into consideration when choosing the letter combinations would be very useful, as well as trying to make as many combinations as possible alternate hands so a touch typist can hit one key with each hand in most cases. The other obvious consideration would be how far each key is from home-row; i.e. how far does the finger have to travel to type.

[Feature request] Select block of code when jumping

In the Atom version, if you already have selection under cursor, Jumpy would select a block of code from that selection to the destination of your jump. Would you consider adding that feature in the VS Code version as well?

Hi (Atom Jumpy author)

Hi,

I'm flattered you enjoyed Jumpy and ported it! I actually just found out about it today.

The quick check of the code looks really clean, although just quick pass through. Impressed you did it in so few LOC!

I had loose plans to port it over myself, although I haven't yet played much with VS Code (yet).

I see it's not completely full featured yet. Would you be interested in collaborating with me in future endeavors? If not, no guarantees I don't make a competing version ;)

No but seriously, I'd love to have a partner in crime!

Currently, right before finding out about this, my plan was to rewrite core Jumpy and Qolor (my other package) in Elm.

Then I think I/we can use "ports" (still only very limited knowledge of Elm) to communicate with the javascript and therefore have access to Atom or VSCode APIs.

Basically, Elm would hold the state machine etc. I currently have a completely rewritten version (99.5% done but not released) using javascript-state-machine but my goal is to redo that with elm

I noticed that your company lists some functional languages, so any help on that side of things would be extremely helpful too. No pressure in any of this of course side projects after all...

Would you mind if I email you at your companies email so we can start a thread?

Also, jumpy has a gitter page that would work well too!

The two letter code to jump should not be case sensitive

Hi,

If you try to use uppercase letters while jumping, it does not work. The first uppercase letter will be considered a escape char and the second becomes a new character in the text.

Since the decorators are limited to lowercase only letters, and there is already a bunch of pairs 😄, it appears to be more relevant, just ignore the case for jumping.

Thanks

Please expand jumpy ranges to visibleRanges

Thank you for developing awesome plugin!

I want to use jumpy more widely.
How about expand jumpy ranges to texteditor.visibleRanges, as following.

const plusMinusLines = vscode.window.activeTextEditor.visibleRanges[0].end.line - vscode.window.activeTextEditor.visibleRanges[0].start.line;

Use for partial suggestions

Would it be possible to allow accepting partial suggestions? VSCode (Insiders) now allows accepting partial inline suggestions, word-by-word.

When using Jumpy, the inline suggestion is not part of the search. Any idea if the current APIs for VSCode would allow jumping to words in the inline suggestion to accept all words before and including that word? Or should I file this under microsoft/vscode instead?

Add homing beacon

Decoration of cursor position background after jumping, timeout after X milliseconds, user configurable.

Open VSX Registry: Awareness and Important Steps

@banggua has published this extension in the Open VSX Registry.

The service was recently transferred to the Eclipse Foundation and we want to ensure a seamless transition for our users. To ensure uninterrupted service and more exposure for your extension, I recommend the following.

To the maintainers: If you would like to take over publishing to open-vsx.org, here’s how: https://github.com/eclipse/openvsx/wiki/Publishing-Extensions

To the current publisher: Please sign the Eclipse Publisher Agreement. The signing process is explained in the Wiki (steps 1 and 2).

Claiming ownership of the namespace for your extension(s). To find out how to do this, see:
https://github.com/eclipse/openvsx/wiki/Namespace-Access
As owner you can add more namespace members (including service accounts) yourself in https://open-vsx.org/user-settings/namespaces. Note that publishing can be done by any contributor to the extension, namely those you add as namespace members once they have signed the Publisher Agreement as well.

Please also note that a license is now mandatory for publishing your extension to Open VSX. If your project doesn't have any license, please add one, preferably an open source license such as MIT. The publishing tool ovsx offers to automatically add the MIT license when you try to publish without a license.

Useful links:
Eclipse Publisher Agreement
Eclipse Foundation Open VSX Registry Frequently Asked Questions (FAQ)

More details are in these recent blog posts:
https://blogs.eclipse.org/post/brian-king/open-vsx-registry-under-new-management
https://blogs.eclipse.org/post/brian-king/new-era-open-vsx-registry

Today, there’s growing momentum around open source tools and technologies that support Visual Studio (VS) Code extensions. Leading global organizations are adopting these tools and technologies. This momentum has spurred demand for a marketplace without restrictions and limitations. We hope you join us on this journey as we continue to build the Open VSX community.
We look forward to continued innovation from you in 2021!

Cannot read property 'setDecorations' of undefined

  • Issue Type: Bug
  • Extension Name: vscode-jumpy
  • Extension Version: 0.3.1
  • OS Version: Linux x64 4.19.0-2-amd64
  • VSCode version: 1.31.1
{
	"activationTimes": {
		"startup": false,
		"codeLoadingTime": 7,
		"activateCallTime": 29,
		"activateResolvedTime": 0,
		"activationEvent": "onCommand:extension.jumpy-word"
	},
	"runtimeErrors": [
		{
			"name": "TypeError",
			"message": "Cannot read property 'setDecorations' of undefined"
		}
	]
}

Not compatable with CAPS ON

There are times that CAPS need to be turned on. With caps on, jumpy interprets any a-z key as a non a-z key and exits. Could this be fixed please or is there not enough demand?.

TypeError: Cannot read property 'setDecorations' of undefined

TypeError: Cannot read property 'setDecorations' of undefined
	at exitJumpyMode (/home/capaj/.vscode/extensions/wmaurer.vscode-jumpy-0.3.1/out/src/extension.js:37)
	at /home/capaj/.vscode/extensions/wmaurer.vscode-jumpy-0.3.1/out/src/extension.js:83
	at l.fire (/snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:45)
	at /snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:831
	at l.fire (/snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:45)
	at b.acceptDocumentsAndEditorsDelta (/snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:718)
	at b.$acceptDocumentsAndEditorsDelta (/snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:716)
	at m._doInvokeHandler (/snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:870)
	at m._invokeHandler (/snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:870)
	at m._receiveRequest (/snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:868)
	at m._receiveOneMessage (/snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:867)
	at /snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:865
	at l.fire (/snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:45)
	at v.fire (/snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:256)
	at /snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:1059
	at l.fire (/snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:45)
	at v.fire (/snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:256)
	at t.PersistentProtocol._receiveMessage (/snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:261)
	at /snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:258
	at l.fire (/snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:45)
	at p.acceptChunk (/snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:253)
	at /snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:253
	at Socket.t (/snap/code/48/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:263)
	at Socket.emit (/snap/code/48/usr/share/code/resources/app/out/vs/code/electron-browser/workbench/events.js:223)
	at addChunk (/snap/code/48/usr/share/code/resources/app/out/vs/code/electron-browser/workbench/_stream_readable.js:309)
	at readableAddChunk (/snap/code/48/usr/share/code/resources/app/out/vs/code/electron-browser/workbench/_stream_readable.js:290)
	at Socket.Readable.push (/snap/code/48/usr/share/code/resources/app/out/vs/code/electron-browser/workbench/_stream_readable.js:224)
	at Pipe.onStreamRead (/snap/code/48/usr/share/code/resources/app/out/vs/code/electron-browser/workbench/internal/stream_base_commons.js:181)

[Feature request] Specify the range of letters used for jumping (eg [asdfghj])

First of all, it is a great extension, thank you!

I would appreciate the possibility to limit/specify the range of letters used for jumping, as for example in the vimium extension for Chrome or Mozilla.

At the moment, the used range is [a-z]{2}.
What about [asdfghjkl]{1,3}, (eg one letter jumps to words/lines closest to the cursor)?

I just find that alphabetical order of jumps is not the most keyboard friendly.
Letters from middle keyboard row are easier to reach, imho.

Thanks!

jumpy highlight (hold shift) feature request

Hi, was thinking it would be nice to have a "this is where your cursor is now, and now jump and highlight to this other spot"

So, jumpy while holding shift.

Looks like this repo hasn’t been updated in a while, but I thought it’s worth a shot to ask :)

confusion with vscode-jumpy-plus?

Why is there another jumpy implementation with a "-plus" name, that still links to this repository but has a different user name(johnpyp vs @wmaurer ) ?
Would be good to clarify this on the extension page so that it is clear which one should be installed.

[Bug] Decorations visible in non-jumpy mode

Jumpy: 0.2.1
VSCode: 1.6.0

Replicate

  1. Create two editors in single window
  2. Activate Jumpy
  3. Switch to the other editor
  4. Press enter or any decoration shortcut
  5. The decorations are showing outside of Jumpy mode

[Feature] Scroll code into view

With a long method (some 600 lines) and I activate jumpy and type some characters, it will correctly tag the line, however, it is out of view so I don't see it?

Is there anything that can be done, perhaps scrolling the first marker into view?

jumpy swallows type events when disabled

I'm maintaining an extension (https://github.com/michaelgriscom/LeaderMode) which leverages VSCode's type command to expand shortcut keys that jumpy clashes with. Upon being enabled, jumpy registers a custom type command, bubbling the type event to the default command if jumpy is disabled

const jumpyTypeDisposable = vscode.commands.registerCommand('type', args => {
if (!isJumpyMode) {
vscode.commands.executeCommand('default:type', args);
return;
}

The issue is that when the jumpy extension registers its type command other non-default listeners don't see the event, breaking other extensions (this is essentially the reverse of issue #1). I believe that a better approach would be to dispose of the command whenever jumpy is disabled, then re-register the command when it is enabled; that way the jumpy command only exists when the mode is active. I've taken that approach with LeaderMode and haven't noticed any perf impact

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.