Home Download Buy Blog Forum Support

InsertNums - Sequential alphanumeric insertion

InsertNums - Sequential alphanumeric insertion

Postby jbrooksuk on Tue Feb 08, 2011 9:04 am

Hi all,

Back in 2011, I wrote my first Sublime Text plugin, InsertNums. Today I'm finally releasing a new version. It's somewhat a mash up between the original InsertNums and IncrementSelection, as now you can increment through letters as well as numbers.

Ctrl+Alt+N will bring up the input panel, then just use
Code: Select all
1 1 0
for numbers (where the first 1 is your starting number) or
Code: Select all
a 1 0
where a is your starting letter.

One of the great side effects of introducing alpha sequences is that you can generate seemingly (but definitely not) random sequences. For instance, using
Code: Select all
a 12345 0
will generate the following across three selections:

Code: Select all
a
rfv
ajmq


All that's happening there is that the next letter in the sequence is shunted across by the step amount.

Anyway, you can find InsertNums on GitHub.

James
Last edited by jbrooksuk on Wed Nov 06, 2013 5:07 pm, edited 4 times in total.
jbrooksuk
 
Posts: 689
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: InsertNums

Postby rolandba on Fri Mar 11, 2011 1:27 pm

Hi, it would be nice to have such plugin form me, but it is not working in ST2 for me.
It promts me for two numbers and after any combination onlu one number is entered in text.

Any idea? thank you.
rolandba
 
Posts: 4
Joined: Fri Mar 11, 2011 12:25 pm

Re: InsertNums

Postby adzenith on Fri Mar 11, 2011 4:58 pm

rolandba wrote:Hi, it would be nice to have such plugin form me, but it is not working in ST2 for me.
It promts me for two numbers and after any combination onlu one number is entered in text.

Any idea? thank you.

How many selections do you have? It'll only put one number per selection.
adzenith
 
Posts: 1204
Joined: Mon Oct 19, 2009 9:12 pm

Re: InsertNums

Postby jbrooksuk on Fri Mar 11, 2011 5:11 pm

rolandba wrote:Hi, it would be nice to have such plugin form me, but it is not working in ST2 for me.
It promts me for two numbers and after any combination onlu one number is entered in text.

Any idea? thank you.

It takes two numbers. First is the starting number (default 1) second is the increment number, so if you start from 1 and increment 2, you'll get 1 3 5 7 etc etc
jbrooksuk
 
Posts: 689
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: InsertNums

Postby kramed on Wed Aug 01, 2012 12:30 am

@jbrooksuk: I found this very useful and submitted this to Sublime Package Control. It is available to install now under the name InsertNums. Repo is at https://bitbucket.org/markstahler/insert-nums
kramed
 
Posts: 5
Joined: Thu Jan 05, 2012 4:49 pm

Re: InsertNums

Postby mhenry07 on Thu Aug 09, 2012 7:22 pm

@kramed Thank you for setting up the package. I noticed that the description on the bitbucket page says the default binding is Control + Shift + N, but it seems the actual binding is Control + Alt + N. Could the description be fixed?

Thanks!
Mike
mhenry07
 
Posts: 1
Joined: Thu Aug 09, 2012 7:11 pm

Re: InsertNums

Postby kramed on Sat Sep 15, 2012 2:23 am

Good catch. Fixed.

mhenry07 wrote:@kramed Thank you for setting up the package. I noticed that the description on the bitbucket page says the default binding is Control + Shift + N, but it seems the actual binding is Control + Alt + N. Could the description be fixed?

Thanks!
Mike
kramed
 
Posts: 5
Joined: Thu Jan 05, 2012 4:49 pm

Re: InsertNums

Postby jbrooksuk on Tue May 14, 2013 3:16 pm

Yay! First real update in two years. It's finally on GitHub and compatible with ST3 and should be ST2 too.
jbrooksuk
 
Posts: 689
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: InsertNums

Postby jbrooksuk on Wed Jul 03, 2013 12:26 pm

There have been a few updates over the last couple of weeks:


Both hex support will be merged later on, so you can perform bitwise operations on just x1 etc. As soon as I know it's working, that's why it's currently undocumented.

Get it here. Or on Package Control under "Insert Sequences".
jbrooksuk
 
Posts: 689
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: InsertNums (Insert Sequences on Package Control)

Postby jbrooksuk on Wed Nov 06, 2013 11:55 am

This morning I updated InsertNums to add a new key binding (same as before, but add Shift) to not automatically insert the sequence. I don't know why you'd want to do this, but it was requested and so someone has a need for it.
jbrooksuk
 
Posts: 689
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Next

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 8 guests