Coder Social home page Coder Social logo

hideoo / trailing Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 1.0 246 KB

Visual Studio Code extension - Toggle trailing symbols: commas, semicolons and colons.

Home Page: https://marketplace.visualstudio.com/items?itemName=hideoo.trailing

License: MIT License

Shell 0.10% TypeScript 98.25% JavaScript 1.65%
colon comma cursor extension selection semicolon symbols toggle trailing vscode

trailing's Introduction

Trailing icon

Trailing

Toggle trailing symbols: commas, semicolons and colons.

Integration Status License

Demo of the Trailing Extension

Features

As none of the existing trailing symbols toggling extension were fitting my needs, I decided to write my own with the following features:

  • Toggle multiple trailing symbols: commas, semicolons and colons.
  • Alternate keyboard shortcuts to toggle trailing symbols and automatically add a new line after them.
  • Option to control whether the cursor(s) should jump to the trailing symbol(s) (or added new line) when toggled.
  • Support for code comments.
  • Support for multiple cursors.
  • Support for multiple selections.

Usage

Set your cursor(s) on one or multiple line(s) and press one of the keyboard shortcuts provided by the extension.

You can also use the Visual Studio Code Command Palette and choose one of the Toggle trailing … or Toggle trailing … and add new line commands.

Shortcuts

This extension provides various configurable keyboard shortcuts to toggle trailing symbols.

Shortcut Description
Ctrl + , Toggle trailing comma.
Ctrl + Alt + , Toggle trailing comma and add new line.
Ctrl + ; Toggle trailing semicolon.
Ctrl + Alt + ; Toggle trailing semicolon and add new line.
Ctrl + Shift + ; Toggle trailing colon.
Ctrl + Shift + Alt + ; Toggle trailing colon and add new line.

Configuration

This extension contributes a language overridable setting to Visual Studio Code to control whether the cursor should automatically jump to the trailing symbol (or added new line) when toggled. This setting defaults to true and can be modified in the settings:

{
  "trailing.jumpToSymbol": false
}

Additionally, you can override this setting for specific languages:

{
  "[javascript]": {
    "trailing.jumpToSymbol": true
  }
}

License

Licensed under the MIT License, Copyright © HiDeoo.

See LICENSE for more information.

trailing's People

Contributors

hideoo avatar tennox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

tennox

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.