AkelPad Forum Index AkelPad
Support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Scripts plugin: Is there a script that removes line numbers?

 
Post new topic   Reply to topic    AkelPad Forum Index -> Discussion (English)
View previous topic :: View next topic  
Author Message
djray



Joined: 20 Jan 2009
Posts: 11

PostPosted: Mon Jun 20, 2011 10:21 pm    Post subject: Scripts plugin: Is there a script that removes line numbers? Reply with quote

Hi,

As always, I'm loving AkelPad!

I'm just wondering if anyone has written a custom script for the Scripts plugin that removes trailing line numbers from copy and pasted code?

Cheers!
Back to top
View user's profile Send private message
Instructor
Site Admin


Joined: 06 Jul 2006
Posts: 5321

PostPosted: Tue Jun 21, 2011 9:23 am    Post subject: Reply with quote

djray
Example?
Back to top
View user's profile Send private message Send e-mail
Infocatcher



Joined: 06 Aug 2007
Posts: 1616

PostPosted: Tue Jun 21, 2011 9:42 am    Post subject: Reply with quote

djray
Something like
Code:
AkelPad.ReplaceSel(
   AkelPad.GetSelText()
      .replace(/^\d+[ \t]/mg, "")
);
?

P.S. Example: https://developer.mozilla.org/en/Code_snippets/Windows#Draggable_windows (JavaScript should be enabled).
Back to top
View user's profile Send private message Visit poster's website
Fr0sT



Joined: 24 Jul 2007
Posts: 876

PostPosted: Tue Jun 21, 2011 2:43 pm    Post subject: Reply with quote

Also consider using column selection (Alt+arrows/mouse)
Back to top
View user's profile Send private message
djray



Joined: 20 Jan 2009
Posts: 11

PostPosted: Sun Jul 31, 2011 7:36 pm    Post subject: Reply with quote

Fr0sT wrote:
Also consider using column selection (Alt+arrows/mouse)


Neato! So simple, yet so useful!
Never knew about this function in Akelpad before Wink

Thanks Fr0sT!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AkelPad Forum Index -> Discussion (English) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


SourceForge.net Logo Powered by phpBB © 2001, 2005 phpBB Group