Coder Social home page Coder Social logo

boundary-move's Introduction

Boundary Move

Boundary Move improve cursor move like as cursorWordPartRight/cursorWordPartLeft commands.
The difference from cursorWordPartRight/cursorWordPartLeft commands is the stop position.
This extension sets stop positions in more detail.

capture

Features

  • move: Move cursors to the left/right boundary.
  • select: Select from current position to the left/right boundary.
  • jump: Jump cursors to the specified position.
    • jump
      Input destination directly.
    • jump line
      Input lineNumber then input destination.
  • selectJump: Select from current position to the specified position.

Stop position

If text is as below.

function func1(){}

cursorWordPartRight/cursorWordPartLeft stop positions are as below.

‾function‾ ‾func1‾(){}‾

This extension stop positions are as below.

‾function‾ ‾func‾1‾(‾)‾{‾}‾

Capital letter

If text is as below.

CatLikeTuna

With the default settings, stop positions are as below.

‾Cat‾Like‾Tuna‾

If you want to stop between upper letter and lower letter, set boundary-move.capitalLetter to false.
Then stop positions are as below.

‾C‾at‾L‾ike‾T‾una‾

Special characters

If text is as below.

"Cat", "", "Dog",

cursorWordPartRight/cursorWordPartLeft stop positions are as below.
Cannot stop between double quotations.

‾"‾Cat‾",‾ ‾"",‾ ‾"‾Dog‾",‾

If you want to stop between double quotations.
Set " to boundary-move.specialCharacters.
Then stop positions are as below.

‾"‾Cat‾"‾,‾ ‾"‾"‾,‾ ‾"‾Dog‾"‾,‾

Special characters are always detect as boundary.

Japanese support

If text is as below.

猫は、マグロが大好きです。

cursorWordPartRight/cursorWordPartLeft stop positions are as below.

‾猫は、マグロが大好きです。‾

This extension(with default settings) stop positions are as below.

‾猫は‾、‾マグロが大好きです‾。‾

If you set boundary-move.japanese to true.
Then stop positions are as below.

‾猫‾は‾、‾マグロ‾が‾大好‾きです‾。‾

Commands and Keybinds

Caution: This extension replaces default cursor movement keys.

command default keybind description
BM.moveLeft left Move cursors to the left boundary.
BM.moveRight right Move cursors to the right boundary.
BM.selectLeft shift + left Select from current position to the left boundary.
BM.selectRight shift + right Select from current position to the right boundary.
BM.jump Jump the cursor to specified position.
BM.jumpLine Jump the cursor to specified position.
BM.selectJump Select from current position to specified position.
BM.selectJumpLine Select from current position to specified position.
BM.info Output debug information to the OutputChannel.
cursorLeft ctrl + left Move cursors to left.
cursorRight ctrl + right Move cursors to right.
cursorLeftSelect ctrl + shift + left Select from current position to left.
cursorRightSelect ctrl + shift + right Select from current position to right.

Configuration

settings.json

  // Marker margin.
  "boundary-move.markerMargin": "0ex 0.3ex 0ex 0.7ex",

  // Detect capital letter
  "boundary-move.capitalLetter": true,

  // This characters always detect as boundary.
  "boundary-move.specialCharacters": "\"'`()[]{}",

  // Improve Japanese boundary.
  "boundary-move.japanese": false,

  // Zoom out before jump. 0 is no zoom out.
  "boundaryMove.jumpZoomOutLevel": 1,

  // Center cursor after move.
  "boundaryMove.alwaysCenter": false

  // Center cursor after jump.
  "boundaryMove.jumpToCenter": false

Marker Color

Default marker color.

[
  {
    "id": "boundaryMove.markerColor",
    "description": "MakerColor",
    "defaults": {
      "dark": "#222222",
      "light": "#dddddd",
      "highContrast": "#000000"
    }
  },
  {
    "id": "boundaryMove.markerBackgroundColor",
    "description": "MarkerBackgroundColor",
    "defaults": {
      "dark": "#dddddd",
      "light": "#222222",
      "highContrast": "#ffffff"
    }
  }
]

If you want to customize marker color, edit settings.json as below.

  "workbench.colorCustomizations": {
    "boundaryMove.markerColor": "#000000",
    "boundaryMove.markerBackgroundColor": "#ffffff"
  },

boundary-move's People

Contributors

bluesilvercat avatar dependabot[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

ken-okabe

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.