Git Product home page Git Product logo

incrementor's Introduction

Sublime Text 3 Plugin: The Incrementor

A Sublime Text 3 (ST3) Plugin that can generate a sequence of numbers and alphabets using search and replace. Ported to ST3 by Sanchit Karve from original Incrementor implementation for ST2 by eBookArchitects.

Example Image

Example (Before):

10. Bob
12. Larse
15. Billy

Find: [0-9]+\. Replace: \i.

Example (After):

1. Bob
2. Larse
3. Billy

You can also take start and step arguments \i(start,step) in parenthesis.

Example (Before):

10. Bob
12. Larse
15. Billy

Find: [0-9]+\. Replace: \i(10,10).

Example (After):

10. Bob
20. Larse
30. Billy

The Incrementor also supports negative steps! \i(start,-step)

Example (Before):

10. Bob
12. Larse
15. Billy

Find: [0-9]+\. Replace: \i(100,-10).

Example (After):

100. Bob
90. Larse
80. Billy

Lastly, The Incrementor also supports alphabet replacements \a for lowercase and \A for uppercase.

Example (Before):

10. Bob
12. Larse
15. Billy

Find: [0-9]+\. Replace: \a.

Example (After):

a. Bob
b. Larse
c. Billy

Note that start and step are not supported for alphabet replacements.

Using

Use the keybinding to prompt for your find and replace.

Windows: [Ctrl + Alt + Shift + H]

Linux: [Ctrl + Alt + Shift + H]

OSX: [Cmd + Opt + Shift + H]

Installing

TODO

Todo

  • Replace based on order of selection as well as their direction.
  • Scroll to matching pattern like sublime's default find window.
  • Allow prepending 0s to the initial number. (001, 002, 003, 004, etc.)
  • Add number of replaced items in statusbar after completion.
  • Add step support for alphabet replacements

License

Creative Commons Attribution 2.0 Generic

incrementor's People

Contributors

atroia avatar born2c0de avatar

Watchers

James Cloos 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.