【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'
縦項目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'
Author And Source
この問題について(【EmEditor】小技マクロ集), 我々は、より多くの情報をここで見つけました https://qiita.com/inokou/items/160ce892948d0c4c3185著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .