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

English main discussion
Post Reply
  • Author
  • Message
Offline
Posts: 11
Joined: Tue Jan 20, 2009 9:15 am

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

Post by djray »

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!

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

djray
Example?

Offline
Posts: 1862
Joined: Mon Aug 06, 2007 1:07 pm
Contact:

Post by Infocatcher »

djray
Something like

Code: Select all

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

P.S. Example: https://developer.mozilla.org/en/Code_s ... le_windows (JavaScript should be enabled).

Offline
Posts: 876
Joined: Tue Jul 24, 2007 8:54 am

Post by Fr0sT »

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

Offline
Posts: 11
Joined: Tue Jan 20, 2009 9:15 am

Post by djray »

Fr0sT wrote:Also consider using column selection (Alt+arrows/mouse)
Neato! So simple, yet so useful!
Never knew about this function in Akelpad before ;)

Thanks Fr0sT!
Post Reply