topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday December 12, 2024, 9:33 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Control lines  (Read 2584 times)

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Control lines
« on: December 29, 2013, 07:58 AM »
I would like

a text editor able to control lines in special ways.

By example :
1. Maintain lines 1,5,9,13,17,21, and so on until the final of the txt file.
That is a aritmetic progression of reason equal to 4, where the first is 1.
Delete the rest of lines.

2. Any other criteria over the lines.

Note : i am only looking now for the 1. . It's the important case to me now.

Best Regards
Happy New Year
 :-*

Edvard

  • Coding Snacks Author
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 3,022
    • View Profile
    • Donate to Member
Re: Control lines
« Reply #1 on: December 31, 2013, 12:46 AM »
Textpad 5 I found to be particularly useful regarding line manipulation.  You can 'bookmark' lines you want to keep and then "Delete unselected lines".  I think Notepad++ can do similar, but it's somewhere else in the menu.  To select the lines you want programatically, Textpad has extensive support for macros (almost as good as scripting):
http://www.textpad.c.../add-ons/macros.html
and Notepad++ can be scripted with Python via the Python plugin:
http://www.sivachand...pad-with-python.html

Sorry I don't have a more definitive answer, hope it helps though.  :(

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Control lines
« Reply #2 on: December 31, 2013, 08:48 PM »
Thanks a lot Edvard and happy new year 2014.

At the present moment I am applying the wonderful script from Skwire
https://www.donation...ex.php?topic=36898.0

I'll take a look to both programs. At the present I know notepad++ that i am using as an alternative to PSPad where i find more confortable.

Best Regards
 :-*