[comp.editors] Why oh Why "Cannot put inside global/macro"

ir586@sdcc6.ucsd.edu (J Anthony Deutsch) (12/12/90)

Why does the macro:
	map q dd1GP
give me the error :
	cannot put inside global/macro

I'd like to rearrange the lines of my .newsrc file by preference, 
sending some to the top some to the bottom, but I haven't been 
able to work around this problem. Is there a workaround ? 
And anyway, does anyone know why the hell I can't put inside a 
global/macro ? 

gosh thanks in advance if some kind soul sheds some light on 
my miserable existance. YF.

tchrist@convex.COM (Tom Christiansen) (12/12/90)

In article <14895@sdcc6.ucsd.edu> ir586@sdcc6.ucsd.edu (J Anthony Deutsch) writes:
>Why does the macro:
>	map q dd1GP
>give me the error :
>	cannot put inside global/macro

I *think* it's because of a common buffer used by both operations.
Seems to me there's a comment in the code saying it would be 
fixed "later" date 1980.  Sigh.

Now, sometimes you can and sometimes you can't:

"       EXCHANGE MACROS -- for exchanging things
"
map v xp
"       exchange current char with next one in edit mode
map V :m+1^M
"       exchange current line with next one in edit mode
map! ^P ^V^[hxpa
"       exchange last typed char with penultimate one in insert mode

So for the line ones, you break down and use the mv command, which
is ok.  

You could do this in your case:

    map q :m1^M''

I like the '' to put me back where I was.

--tom
--
Tom Christiansen		tchrist@convex.com	convex!tchrist
"With a kernel dive, all things are possible, but it sure makes it hard
 to look at yourself in the mirror the next morning."  -me

maart@cs.vu.nl (Maarten Litmaath) (12/13/90)

In article <14895@sdcc6.ucsd.edu>,
	ir586@sdcc6.ucsd.edu (J Anthony Deutsch) writes:
)Why does the macro:
)	map q dd1GP
)give me the error :
)	cannot put inside global/macro

That's a known bug.  Workaround: learn `ex' commands!

	map q :m0^V^M
--
In the Bourne shell syntax tabs and spaces are equivalent almost everywhere.
The exception: _indented_ here documents.  :-(
Does anyone remember the famous mistake Makefile-novices often make?