How to insert a column of increasing numbers in Sublime Text 2?

The Text Pastry plugin does the job very well. It offers the Insert Numbers Syntax.

Select multiple lines with CMD+SHIFT+L (Sublime default):

   text|
   text|
   text|
   text|

Move the cursor where you want it:

 | text
 | text
 | text
 | text

And insert numbers with Text Pastry by hitting CMD+ALT+N and entering 1 space 1 space 0:

 1| text
 2| text
 3| text
 4| text

Where 1 space 1 space 0 stands for:

  • Integer to start with 1
  • Increment by 1
  • Padd leading zeros 0

Replace CMD with CTRL on Windows or Linux machines.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)