At 01:10 AM 6/20/2006, you wrote:
Message: 4
Date: Tue, 20 Jun 2006 09:03:58 +0100
From: Steve Fisher <[EMAIL PROTECTED]>
Subject: Re: [scite] Search & Replace feature
To: Discussion of the SciTE editor <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Thanks Guys,
OK When I left yesterday I had a file (in memory) with just carriage
returns in it. Of course when I saved it, they were all replaced by cr/lf
Tried all your suggestions - can't get them to work.
what I now have is:
valid line of text{cr/lf}
{cr/lf} <------------------------ I want to remove these!!!!
valid line of text{cr/lf}
and so on for about 2,500 lines. If it is not possible then I will have
to write an autoit script to do it.
Thanks
Steve
In other words, you want to remove all blank lines
Try this little script
function RemoveBlankLines()
local txt = ""
local start_line=editor:LineFromPosition(editor.SelectionStart);
local end_line=editor:LineFromPosition(editor.SelectionEnd);
for i=start_line,end_line do
local line = editor:GetLine(i)
line = string.gsub(line, "^[\r\n]+", "")
txt = txt .. line
end
editor:ReplaceSel(txt)
end
May be this is what you are looking for
Srish Agrawal
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.394 / Virus Database: 268.9.0/368 - Release Date: 6/16/2006
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest