#4310
ShuHei
メンバー

いろんなやり方ありますので一例ということで。

test.jseeという名前で下記を保存してemeditorで実行してあげてください。

prefix = prompt(“行頭に入れたいのを入力してください。”,””);
suffix = prompt(“行末にいれたいのを入力してください。”,””);

eols = document.selection.Text.match(/(rn|r|n)/);
if(eols != null) {
eol = eols[0];
lines = document.selection.Text.split(eol);
for(var n in lines) {
lines[n] = prefix + lines[n] + suffix;
}
document.selection.Text = lines.join(eol);
} else {
document.selection.Text = prefix + document.selection.Text + suffix;
}

因みにマクロ使わずに正規表現でもお手軽に出来ますよー