shuGH / vscode-jump-to-hint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VSCode Jump to Hint

codebeat badge Latest Release Installs Rating Licence

Jump to Hint is a extention package for the Visual Studio Code to move cursor by simple and visual operation.

demo

Description

This extension was inspired by Atom's Jumpy and Vim's EasyMotion.

You can jump the cursor position to any words, line heads or search results with a hint consisting of a few letters. By typing the hint label as it is, determine the hint to jump to. It is very simple and easy because type in the displayed characters.

Features:

  • Jump to words that match a regular expression.
  • Jump to a beginning of any lines.
  • Jump to results of incremental search.
  • Support multiple pane, jump to a document of anothre pane.
  • The characters to use are specified.
  • Two input styles can be selected.
  • Color of the hint label is configurable.

Usage

Enter command in the command palette (Ctrl-Shift-P or Cmd-Shift-P) or press keybinding.

  1. Hints will be showed and you can type a character of any hints.
  2. Once determined one, jump to that position.

Commands:

  • Jump to Hint: by Word
    • Show hints at all words and hit a key to jump to one of them.
    • Keybinding: ctrl+alt+j w, cmd+alt+j w
  • Jump to Hint: by Line
    • Show hints at all lines and hit a key to jump to one of them.
    • Keybinding: ctrl+alt+j l, cmd+alt+j l
  • Jump to Hint: by Search
    • Begin incremental search and show hints to these results. You can jump to one of them anytime during incremental search.
    • Keybinding: ctrl+alt+j s, cmd+alt+j s

Configrations

Configrations of extention and examples.

  • jumpToHint.common.wordRegExp

    • Regular expression used to identify words in jump-by-word mode.
    • Examples:
      • \w{2,}: Simple.
      • ([A-Z]+([a-z0-9])*)|([a-z0-9]{2,}): Divid uppercase and lowercase.
      • ((?<=[てにをはがのともへでや、。\s\t\n])[ぁ-んァ-ン一-龥ー]{2,}?[てにをはがのともへでや、。]*): てにおはや句読点で区切る。
  • jumpToHint.common.lineRegExp

    • Regular expression used to identify lines in jump-by-line mode.
    • Examples:
      • ^\s*\S+.*
  • jumpToHint.common.hintCharacters

    • Characters used to generate hint label. The left side character has a higher priority.
    • Examples:
      • asdfghjkl;': Use center line key only.
      • 1234567890: Use numeric key only.
  • jumpToHint.common.targetTextEditorType

    • The target to display hints when you split the pane.
    • Values:
      • ActiveTextEditor: Current focused pane only.
      • VisibleTextEditors: All visibled panes. You can also move a focus to another side pnae.
  • jumpToHint.common.inputStyle

    • Input style to select hint.
    • Values:
      • TypeEvent: Input directly without displaying anything.
      • InputBox: Show a inputbox. 日本語等の入力も可能です。
    • Notes: TypeEvent style does not work if some extension registered 'type' command already, force show a inputbox.
  • jumpToHint.type.hintLengthType

    • Type of generated hint label length.
    • Values:
      • Fixed: Hint label has fixed length like [aa] [ab] [ac].
      • Variable: Hint label has variable length depending on the number of hints like [a] [b] [ab].
  • jumpToHint.type.fixedHintLength

    • [Fixed type only] Length of fixed hint label, need to greater than 1.
    • Examples:
      • 2: [aa] [ab] [ac]
      • 3: [aaa] [aab] [aba]
  • jumpToHint.theme.fontColor

    • Font color of hint decoration.
    • Examples:
      • black: ab
      • rgb(0,0,255): ab
  • jumpToHint.theme.backgroundColor

    • Background color of hint decoration.
    • Examples:
      • teal: ab
      • #800080: ab
  • jumpToHint.theme.highlightColor

    • [Serch command only] Highlight color of matched text.
    • Examples:
      • blue: text
      • #E0E0E0: text

Installation

Search extension in marketplace and Install.

  1. In the command palette (Ctrl-Shift-P or Cmd-Shift-P) select Install Extensions.
  2. Search for table formatter and select.

Roadmap

  • CJK partial support.
  • Support multiple panes.
  • Jump to hint by search command.

Known Issues

  • The width of Hint-background is affected by tab sise.
  • ヒントラベルの幅が全角文字やタブの影響を受けます。

Release Notes

The changes are written in Changelog file.

Licence

This package is distributed under the terms of the MIT license.

Special Thanks

Author

Shuzo Iwasaki

( • ̀ω•́ )و Enjoy!

About

License:MIT License


Languages

Language:TypeScript 100.0%