Insert a range of numbers in Sublime Text 2

5,296

Solution 1

I found a package (in the package manager) called "Insert Nums." Select all the regions into which you wish to place numbers, run the command (CTRL-OPT-n on my Mac CTRL-Alt-n for Win/*NIX) and you'll be able to insert numbers. The package allows you to specify the start, step, and number padding.

Solution 2

The Text Pastry package support the syntax from 'Insert Nums', but adds extra features, such as inserting a sequence of words and presets for 1-indexed and 0-indexed number generators.

Share:
5,296

Related videos on Youtube

Ben Jacobs
Author by

Ben Jacobs

VP of Engineering @EncampHQ. Formerly, TV User Interface engineering @Netflix

Updated on September 18, 2022

Comments

  • Ben Jacobs
    Ben Jacobs over 1 year

    Is there a way to insert a range of numbers in Sublime Text 2? I have been unable to find a command or plugin, and I have to insert sequences like this semi-frequently. I'm looking for something akin to :put =range(11,15) in Vim, which would print

    11
    12
    13
    14
    15
    
  • Michael
    Michael almost 10 years
    Also works in sublime text 3