[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [StrongED] wrap and unwrap in block process



In message <52b82eff52.pnyoung@xxxxxxxxxxxxxxxxxxxx>
          Peter Young <pnyoung@xxxxxxxxxxxx> wrote:

> On 16 Dec 2012  Fred Graute <fjgraute@xxxxxxxxx> wrote:
>
> > In message <30971fff52.pnyoung@xxxxxxxxxxxxxxxxxxxx>
> >           Peter Young <pnyoung@xxxxxxxxxxxx> wrote:
>
> [snip]
>
> >> Years ago, Paul Beverley, I think it was (it was certainly in Archive
> >> magazine) mentioned an adaptation of the BaseMode ModeFile which put
> >> Wrap and Unwrap icons on the top bar of a StrongED window, and I've
> >> been happily using these for ages.
> >>
> >> When I looked just now, there are two each of these! Are they now
> >> included in the official release? I must investigate when I get a
> >> round tuit!

Peter, have you found out why each wrap icon appears twice?

> > No, they're not a standard part of BaseMode. Other modes may have icons
> > for Wrap and Unwrap, I know the Document mode does.
>
> I for one would be grateful if it could be incorporated into the
> BaseMode ModeFile, as I do find the ability to do a quick wrap to be
> useful.

Adding icons to the BaseMode toolbar is always a mixed kind of thing,
some people like them, some don't. If there's wide enough support for
it then I'm happy to add them to BaseMode.

For now I'll borrow from Steve Drain's Document mode which has these
definitions for Wrap/Unwrap icons (I hope the tabs come across OK):

	Help		Hnws_join
	Icon		wrap
	Key		^P
	Select		Replace(_wrap,_rwrap,,Noline)

	Key		^?P
	Adjust		Replace(_wrap,_rwrap,text,Noline)

	Help		Hnws_splt
	Icon		unwrap
	Key		^U
	Select		unwrap(,70)

	Key		^?U
	Adjust		unwrap(text,70)

Select click on the wrap icon will join lines in a block when the caret
is inside one, and the whole text otherwise. An Adjust click will always
work on the entire text.

Select click on the unwrap icon will split lines in a block when the
caret is inside one, a the current line otherwise. Here too, an Adjust
click will do the whole text.

Please note that the key shortcuts defined will override those set in
BaseMode so you may wish to alter them.

There are variations possible on the above, you can have StrongED wrap
or unwrap the current paragraph without manual selection. It's tricky
though, I'll leave it as an exercise for those who like challenges. ;-)

Cheers,
Fred.

-- 
StrongED Developer
http://www.stronged.iconbar.com/

-- 
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxxxxx