A small script for the jN plugin that will do this.
It will also add a menu “scripts jN” -> “convertText”
https://github.com/sieukrem/jn-npp-plugin
var scriptsMenu_jN = Editor.addMenu("scripts jN");
function convertText() {
//debugger;
var vStep = 0;
var vText = '', vTextLine = '';
var vLines = Editor.currentView.lines;
for(var i = 0; i< vLines.count; i++, vStep++) {
vTextLine = vLines.get(i).text;
if (vTextLine.charCodeAt(vTextLine.length-1) == 10)
vTextLine = vTextLine.substring(0, vTextLine.length-1); // kill \n
if(vStep < 4) {
vText = vText + vTextLine;
} else {
vText = vText + "\n" + vTextLine;
vStep = 0;
}
}
Editor.currentView.text = vText;
}
scriptsMenu_jN.addItem({
text:"convertText",
cmd:convertText
});