Kein-Hong Man wrote:
Istvan wrote:
I wish to write a lua script which add this text:
Last Modified: 2006.02.01
at the top of the edited file when I save it.
Try this:
editor.TargetStart = editor:PositionFromLine(0)
editor.TargetEnd = editor.LineEndPosition[0]
editor:ReplaceTarget("# Modified: "..os.date('%Y-%m-%d %H:%M:%S'))
That works fine!
Now one think I don't like, after a Save, when do a Undo then I must undo 2
times
to undo the last operation. First will undo the addition for "# Modified ..."
and
the second will undo the last operation.
Howe could I stop recording the undo operation for the writing of "# Modified
..."?
April White wrote:
I wrote something like this for my own use. I can post my solution
here, to the Lua-Users site, or by private email to yourself.
The only problem it seems to have is that the cursor is repositioned to
where you left it, but the visible line on the screen may move.
Please post it to the Lua-Users site. I'm very interested to see your solution.
Thank you!
Istvan
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest