Allows you to jump to anywhere within the visible editor using keystrokes by specifying the first 2 characters after the cursor point where you want to jump to followed by the generated labels.
How to use
Use the keybindings Cmd+e for Mac and Alt+e for Windows/Linux to trigger the command.
Type the first character on the right side of where you want to jump to, you will see labels being added automatically.
Type out the second character and the label, once you type the whole thing, your cursor will jump there.
At any point of time, if there is only 1 label left, you can just press enter to jump there without typing in the rest of the label.
Additional notes
At any point in time, if you made a mistake typing the search character or label, you can just press backspace. This will reset the whole search process and empty your search string. However since the labels are deterministic for the same search string, you can just type in the right thing without having to wait and see what is the generated label.
Note that this extension always uses lowercase for everything, do not use uppercase search characters as the results will be casted to lowercase characters and it will not match.
Jump to target immediately if the first 2 characters is unique.
Defaults to false.
Because when you are in the flow and the tag is shown, its bad to suddenly not require the tag, e.g. if you use so as the word and the tag is ff, you will see soff during the targetting process, and you will just type it out soff, it will be abrupt if it jumps immediately after you type so when you already expected to type ff too and more often than not, you are likely to still type ff, causing it to be typed into your editor instead of being consumed as the selected label.
jmp.centerOnJump
Move line of jump target to center of screen.
Defaults to false.
This scrolls the entire screen to try to show the cursor's line in the center, which is bad if you are not used to the screen jumping around and having to move your eyes and head to follow it. It is expected that your sight is already focused on the jump target when you type in the target label, so turning this off causes the least intrusion to your workflow.
jmp.startLabelWithHomeRowChars
Always start with home row characters like 'f' and 'j' as the first character of label strings instead of any of the available labelling characters to make it easy to start typing the labelling string with the downside being less chance of pressing a unique key immediately for you to press Enter to jump directly.
Set this to false if you don't mind using non-homerow characters as the starting character of longer labels so that you can have a higher chance of hitting a unique label earlier so that you can press Enter to jump directly.
Defaults to true.
This is in line with the design decision to do refinement style search where the labels you type in become increasingly specific, starting from a common character.
Release Notes
0.0.1
Initial release of jmp
How to contribute
Create an issue or fork this project! For bug fixes or feature requests, please create an issue first so that I know you will be working on it, and wait for an approval that any potential contributions will be merged in as I do want to keep this extension lean and simple to make it faster.
Steps to build:
git clone the project
npm install to install dependencies
npm run watch to watch for source changes and compile using TSC
Press F5 on extension.ts to start and a new VSCode window will open
Test the feature/fix and iterate on it.
Build using vsce package
Others
Here are some alternatives to this extension. The biggest difference being that this extension will show the labels from the first keystroke instead of the second, so you can see the labels earlier and type them out faster. The other thing is that the labels are stable meaning if you delete the inputs and try again when you type wrongly, it will show the same labels again instead of a new one that you have to read and type.