2017年2月4日 9:14 am #23444
Yutaka Emura
Keymaster
ent 様
いつもお世話になっております。江村です。
それでは、次のようなマクロはいかがでしょうか?
// if cursor is already at the left edge, quit now
if( document.selection.GetActivePointX(eePosLogical) == 1 ) Quit();
// skip first spaces
for( ;; ) {
document.selection.CharLeft(true,1);
if( document.selection.GetActivePointX(eePosLogical) == 1 ) break;
if( !/^\s/.test(document.selection.Text) ) {
break;
}
}
// Select left to find a space
for( ;; ) {
if( document.selection.GetActivePointX(eePosLogical) == 1 ) break;
document.selection.CharLeft(true,1);
if( /^\s/.test(document.selection.Text) ) {
document.selection.CharRight(true,1);
break;
}
}
よろしくお願い申し上げます。