【EmEditor】小技マクロ集


初めてに

個人的に「EmEditor」を使用する機会が多いですが、かんたんなこと
ですが自分で使っているマクロです

マクロ

縦項目をすべてカンマ区切りに変更

縦項目to横項目_カンマ.jsee
//縦項目をすべてカンマ区切りに変更
document.selection.Replace("\\n",",",eeFindReplaceEscSeq | eeReplaceAll,0);
//最後のカンマを削除
//document.selection.EndOfLine(false,eeLineView);
document.selection.Replace(",$","",eeReplaceAll | eeFindReplaceRegExp,0);
//改行2回
document.selection.NewLine(1);
document.selection.NewLine(1);
実行前
AA
BB
CC
DD
EE
FF

実行後
AA,BB,CC,DD,EE,FF

縦項目をすべてカンマ区切りに変更(文字列対応)

縦項目to横項目_カンマ_文字列.jsee
document.selection.Replace("^",",\x27",eeReplaceAll | eeFindReplaceRegExp,0);
document.selection.Replace("$","\x27",eeReplaceAll | eeFindReplaceRegExp,0);
document.selection.Replace("\\r\\n","",eeReplaceAll | eeFindReplaceRegExp,0);
実行前
AA
BB
CC
DD
EE
FF
実行後
,'AA','BB','CC','DD','EE','FF'