// Macro continueComment.edt. Used to continue formatted comments in a document. // Version 1.2 (J. Fiol) // Copy to %B\Macros\text (?) and assign a shortcut of your choice. // (I am using shift+Enter). // BeginGroup; Assign('MyComment',''); // No Comment unless... IfisMode('Fortran','%!m',!'Assign("MyComment","{<+C}|{< [A-Za-z0-9\$\&\/\+\-\*]}");'); IfisMode('TeX','%!m',!'Assign("MyComment","+{%%}");'); IfisMode('EDT;C','%!m',!'Assign("MyComment","+{/%_/}");'); // Add your own comment character // IfisMode('Mode','%!m',!'Assign("MyComment","Your comment (regular expression)");'); // LetRegNum(3,%c); GetLength(5,"%L"); FindInString("%L", "%$('MyComment');@{ }", 1, 2, 1, 0); IfOK(!`> SetWrap(0);> ExtractByIndex(4, "%L", %!1, %!2);> ExtractByIndex(6, "%L", %!3-1, %!5);> GotoCol(%!3);> NewLine;> CMD("Clear Line");> GotoCol(%!1+1);> InsText("%!4%!6");> RestoreWrap;> `,`> NewLine;`); EndGroup; /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// //////////////////////////// OLD VERSION /////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// //BeginGroup; //Assign('MyComment',''); // No Comment unless... // //IfisMode('Fortran','%!m',!'Assign("MyComment","{<+C}|{< [A-Za-z0-9\$\&\/\+\-\*]}");'); //IfisMode('TeX','%!m',!'Assign("MyComment","+{\%}");'); //IfisMode('EDT;C','%!m',!'Assign("MyComment","{\/\/}");'); //// Add your own comment character and Mode //// IfisMode('Mode','%!m',!'Assign("MyComment","Your comment (regular expression)");'); // //SetIndent(0); //SaveFind; //Mark(0); //CMD("Go To Beginning Of Line"); //SetFindStr("%$('MyComment');@{ }"); //SetSearchForward(1); //SetSearchCaseSensitive(0); //SetSearchEntire(0); //SetSearchCyclic(0); //SetSearchRelaxed(0); //SetSearchWholeWords(0); //SetSearchInline(1); //SetNotFoundNotify(0); //SetSearchCurrentDoc; //SetRegEx(1); //SearchReset; //Find; //GetSel(0,0); //Goto(0); //NewLine; //Ins('%!0'); //SearchReset; //RestoreIndent; //RestoreFind; //Release('MyComment'); //EndGroup;