Home Download Buy Blog Forum Support

Multiple cursor - is possible this?

Multiple cursor - is possible this?

Postby Kcko on Mon Mar 04, 2013 9:36 am

I have this structure
Code: Select all
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>



The desired output is the

Code: Select all
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
<div>9</div>
<div>10</div>


Is it possibble with multiple cursor and some shortcut?

Do not overwrite each line separately.

Thank you

(With Emmet plugin its easy, but only when prepare new structure, structure is already defined above)
Kcko
 
Posts: 11
Joined: Sat Feb 09, 2013 10:37 am

Re: Multiple cursor - is possible this?

Postby FragOnly on Mon Mar 04, 2013 1:07 pm

It looks like this plugin does what you want: http://www.sublimetext.com/forum/viewtopic.php?f=5&t=11376
FragOnly
 
Posts: 19
Joined: Sat Feb 09, 2013 12:50 pm

Re: Multiple cursor - is possible this?

Postby Kcko on Mon Mar 04, 2013 1:24 pm

Yeah, its looks like great, i´will try, thank you. ;)
Kcko
 
Posts: 11
Joined: Sat Feb 09, 2013 10:37 am

Re: Multiple cursor - is possible this?

Postby sapphirehamster on Mon Mar 04, 2013 6:47 pm

There are a variety of plugins out there that will insert numbers based on selection. Some of them are:

https://github.com/eBookArchitects/Incrementor
https://bitbucket.org/markstahler/insert-nums

I tweaked one to have the behavior I wanted:

https://github.com/ehuss/Sublime-Insert-Numbers

There are also ones that will increment existing numbers:

https://github.com/yulanggong/IncrementSelection
https://github.com/prongs/SublimeNumberManipulation
sapphirehamster
 
Posts: 90
Joined: Sun Jul 01, 2012 11:19 pm

Re: Multiple cursor - is possible this?

Postby Kcko on Tue Mar 05, 2013 8:01 am

Thanks I will try all gradually.

This thread was not created only for incrementing numbers in multi cursors.

The main reason for this: it is possible if I mark several positions in the text using multi cursor, edit these "edit points" by using some shortcuts gradually? (A jump from one to the other with the shortcut?) It would mean to me :oops: 8-)
Kcko
 
Posts: 11
Joined: Sat Feb 09, 2013 10:37 am

Re: Multiple cursor - is possible this?

Postby bizoo on Tue Mar 05, 2013 8:24 am

Using bookmarks:
ctrl+f2 to put a bookmark at each selections
shift+/f2 to to navigate

Other option:
https://github.com/colinta/SublimeMarkAndMove
Very similar to bookmarks but more flexible
bizoo
 
Posts: 886
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Multiple cursor - is possible this?

Postby jbrooksuk on Tue Mar 05, 2013 9:13 am

Come on guys, give a man some credit. I originally did this back here.

markstahler did give me some in the initial commit, but there should be a README with a link to my, my website or the original topic...
jbrooksuk
 
Posts: 774
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: Multiple cursor - is possible this?

Postby Kcko on Tue Mar 05, 2013 12:11 pm

bizoo wrote:Using bookmarks:
ctrl+f2 to put a bookmark at each selections
shift+/f2 to to navigate

Other option:
https://github.com/colinta/SublimeMarkAndMove
Very similar to bookmarks but more flexible


Very hot trick, easy to use and easy to remember, thanks
Kcko
 
Posts: 11
Joined: Sat Feb 09, 2013 10:37 am

Re: Multiple cursor - is possible this?

Postby Nova on Tue Mar 05, 2013 3:06 pm

Seems that nobody mentioned this one:

https://github.com/duydao/Text-Pastry
Nova
 
Posts: 19
Joined: Tue Jul 10, 2012 9:01 am

Re: Multiple cursor - is possible this?

Postby myunlessor on Thu Mar 07, 2013 3:51 am

You could try the Emmet plugin
expend this: div{$}*10
myunlessor
 
Posts: 19
Joined: Thu Mar 07, 2013 3:07 am


Return to General Discussion

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot], Majestic-12 [Bot], Yahoo [Bot] and 17 guests