GithubHelp home page GithubHelp logo

bikerdan / sublimenumbermanipulation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prongs/sublimenumbermanipulation

0.0 2.0 0.0 50 KB

manipulate multiple numbers in the document. Useful for writing .md files, snippets etc.

Python 100.00%

sublimenumbermanipulation's Introduction

README

This plugin lets you modify the numbers in your text document.

Use cases

Useful while writing .md files where suppose you are writing a ordered list and you decide to insert a new list element in between. Now you have to increase all the numbers below this element manually. Instead, after installing this plugin, you can do this easily:

  1. Select all those lines
  2. do a ctrl-shift-L to get multiple cursors
  3. Press Home to go to the start of each line(where I assume the numbers are written)
  4. 'ctrl-shift-p' -> "increment numbers"

P.S: I know you don't have to write correct numbers in your .md files but I like to keep it clean

Another Use case is when writing snippets. There are ${1} kind of placeholders. What do you do if you want to insert a placeholder in between? You use my plugin!

Features

  1. Select Next Number : ctrl-shift-P -> Select Next Number. Selects the number immediately next to your cursor position(s)!
  2. Modify Numbers
    • Increment : ctrl-shift-P -> Increment Numbers. Increments selected/just next numbers by 1

    • Decrement : ctrl-shift-P -> Decrement Numbers. Decrements selected/just next numbers by 1

    • Square : ctrl-shift-P -> Square Numbers. Squares selected/just next numbers by 1

    • Double : ctrl-shift-P -> Double Numbers. Doubles selected/just next numbers by 1

    • Sequence: ctrl-shift-P -> Number Sequence. Selected numbers are replaced by consecutive numbers, starting with the first value

    • Custom Modifications : bring up the console by ctrl-` and type

        view.run_command('modify_numbers',{"args":{"modifier_function":(lambda x: x**3)}) #change the function given by the lambda for custom modification
      

sublimenumbermanipulation's People

Contributors

prongs avatar maparent avatar

Watchers

James Cloos avatar Dan Telschow avatar

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.