Home Download Buy Blog Forum Support

is there Increment next line feature ?

is there Increment next line feature ?

Postby jkeks on Wed Sep 14, 2011 4:49 pm

I have text file with src:
http://1.ya.com


How i do much more lines - up to 1000 like this:


without external soft.

Sorry for my noob Question
jkeks
my blog: http://jkeks.ru , and my minishop with more than 400k+ goods: http://citymobi.ru
jkeks
 
Posts: 5
Joined: Wed Sep 14, 2011 4:43 pm

Re: is there Increment next line feature ?

Postby bizoo on Wed Sep 14, 2011 6:44 pm

Don't think there such feature but easy to implement it with plugin (if I remember well there is already a plugin like that).

Or there is the 'Dirty way' :twisted: :
1. Open your file and put the cursor where you want to insert your sequence
2. Open the console
3. Type (or paste):
Code: Select all
b=view.begin_edit();l=['http://jkeks.ru/%d/'%i for i in range(1,101)];view.insert(b, 0, '\n'.join(l));view.end_edit(b)

4. Hit Enter key

Welcome to the dark side of Python :o
bizoo
 
Posts: 873
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: is there Increment next line feature ?

Postby jkeks on Thu Sep 15, 2011 4:28 am

wiii!!! thanks!
very interest and main, but hard to take that for python beginner.
try to search plugin
my blog: http://jkeks.ru , and my minishop with more than 400k+ goods: http://citymobi.ru
jkeks
 
Posts: 5
Joined: Wed Sep 14, 2011 4:43 pm

Re: is there Increment next line feature ?

Postby jkeks on Thu Sep 15, 2011 5:41 am

your recipe work well ! I'm in shock

is there way to make it shortly!?
my blog: http://jkeks.ru , and my minishop with more than 400k+ goods: http://citymobi.ru
jkeks
 
Posts: 5
Joined: Wed Sep 14, 2011 4:43 pm

Re: is there Increment next line feature ?

Postby jbjornson on Thu Sep 15, 2011 7:19 am

There are a few plugins that will help you.

A simple but effective one:
viewtopic.php?f=5&t=1604&start=0

A more complex one with more features:
https://github.com/rmaksim/Sublime-Text-2-Solutions/

Both solutions can be called with a keyboard shortcut (both links have basic info on the required keymap entries).
jbjornson
 
Posts: 344
Joined: Tue Oct 27, 2009 4:25 pm
Location: Zurich, Switzerland


Return to General Discussion

Who is online

Users browsing this forum: MystickPhoenix and 34 guests