Insert new line before line 1

Help with writing and playing macros

Insert new line before line 1

Postby HansFink » Thu Jul 12, 2007 10:38 am

Hello,

I have a "simple" task: I want to insert a new line before line 1 via a macro, but the new line is always entered after line 1.

Here is what I got:

Code: Select all
InsertMode
ColumnModeOff
HexOff
UnixReOff
Top
Key HOME
InsertLine
...


What is wrong with that?
User avatar
HansFink
Basic User
Basic User
 
Posts: 17
Joined: Fri Jan 27, 2006 12:00 am

Re: Insert new line before line 1

Postby jorrasdk » Thu Jul 12, 2007 11:03 am

Yes, InsertLine is supposed to act this way as it also says in the help "Inserts blank line below current cursor position". The Edit-menu equivalent "Insert Line" does exactly the same.

What you need to get what you want is:

Code: Select all
InsertMode
ColumnModeOff
HexOff
Top
"
"
User avatar
jorrasdk
Master
Master
 
Posts: 275
Joined: Mon Mar 19, 2007 11:00 pm
Location: Denmark

Re: Insert new line before line 1

Postby HansFink » Thu Jul 12, 2007 11:14 am

Thanks a lot. That works.
User avatar
HansFink
Basic User
Basic User
 
Posts: 17
Joined: Fri Jan 27, 2006 12:00 am


Return to Macros