#26485
LTT
Participant

By the way,
I use the macro below to quickly change the line length for WrapByChar (according to ActivePointX, the caret position):


//[email protected]

nMarginMin = 10;
nMarginMax = 32767;

nMargin = document.selection.GetActivePointX(eePosLogicalA)-1;
nMargin = Math.max(nMarginMin, nMargin);
nMargin = Math.min(nMarginMax, nMargin);

oCfg = document.Config;
sTip = "WrapByChar ["+ nMarginMin +", "+ nMarginMax +"] = "+ oCfg.General.MarginNormal;
do {
nn = prompt(sTip, nMargin);
if (isNaN(nn) || nn == "") Quit();
nn = Math.ceil(nn);
} while (nn < nMarginMin || nn > nMarginMax);

oCfg.General.MarginNormal = nn;
oCfg.Save();

editor.ExecuteCommandByID (4209) //Wrap by Characters