Re: [Fwd: Re: inserting spaces for a tab from sLisp]
Brought to you by:
set
From: Arnold W. <awi...@te...> - 2005-02-21 20:04:07
|
Welcome back, Salvador; Hope you had a good vacation ;-) I'm in the middle of understanding and getting cvs working on my systems, so once that has settled, I'll recompile the latest version of the editor and let you know how the change works. Hopefully, this will be later this week and after that I hope that I'll also be able to get back to do more testing on the UNC path problem. Arnold Salvador Eduardo Tropea wrote: > Thiago F.G. Albuquerque wrote: > >> On Sat, 12 Feb 2005, Arnold Wiegert wrote: >> >>> Thiago F.G. Albuquerque wrote: >>> >>>> On Thu, 10 Feb 2005, Arnold Wiegert wrote: >>>> >>>>> Hello again, >>>>> >>>>> I've just tried to work some more on my lisp macros - macros.slp - >>>>> as a replacement for pseudo macros and I'm trying to use the >>>>> InsertText function to insert spaces using a "\t" string. >>>> >>>> >>>> >>>> >>>> (InsertText "\t") inserts a real tab. >>>> >>>>> It works, but I was hoping it would take a hint from the editor >>>>> setup which calls for using spaces in place of tabs to keep things >>>>> lined up. >>>>> >>>>> Is there (another) way to do this and get spaces - the number of >>>>> spaces set in the Tool&Ops->Options->GlobalEdition->TabSize field? >>>> >>>> >>>> >>>> >>>> AFAIK, no. >>>> >>>> One possible solution to this would be to create a new sLisp >>>> command, e.g. (GetTabSize). But currenlty, there is no such thing. >>>> >>> Since it appears that lisp functions such as cmcNewLine use smart >>> indenting, I expected/hoped that the other 'features' such as tab/space >>> replacement etc. should also be taken into account. >> >> >> >> I agree with you. 'cmcNewLine' is the command assigned to <enter>, but >> there is no similar command for <tab> >> > > I'm back from my vacations and now I'm slowly reading the old mails ... > Ok, I added "cmcSmartTab" and assigned it to Tab (important!!! people > using custom keybord bindings will need to add this). > Then I moved the code inside TCEditor::InsertCharInLine to a new > function TCEditor::SmartTab(). > So now if the editor gets a tab from the keyboard (not translated to a > command) will insert an ASCII 9, but the default is to translate tab > into cmcSmartTab. This command implements the complex behavior. > > Please report any crazy behavior generated by this change. > > Regards, SET > |