An extreme minification of Redaktilo.
Usage:
<?php
require_once __DIR__.'/r.php';
r(__DIR__.'/life-of-brian.txt', "[Both guards snigger]\n", "Pontius Pilate: '...Dickus?'\n");
Redaktilo manages the line break for you (in v0.3 it even detects it) and saves cursor to a current line.
Imagine that our file life-of-brian.txt
only contained multiple [Sniggering]
, it means that we should jump down to the 4th occurence:
$line = '[Sniggering]';
$editor->jumpDownTo($file, $line);
$editor->jumpDownTo($file, $line);
$editor->jumpDownTo($file, $line);
$editor->jumpDownTo($file, $line);
Redaktilo also allows you to insert a new line aboe or under the current one.