title: Create a simple pure Pascal-only text editor on Linux
body: <p>All right ? I'm wanting to create a simple text editor only in pure Pascal on Linux, simply so that I can open a file and edit it within the program itself, or create one within it and do the rest already mentioned. What I got so far is the following:</p>
  <p>In this code below I create a file, then I add the text I want to it without exiting the program and I only exit with CTRL-Z, but there is no interaction of the directional arrows to be able to edit the file as needed:</p>
  <pre><code>program textos;
  uses crt;
  
  var
    file_name: string;
    f: text;
    c: char;
    s: string;
  begin
    writeln('Enter the name of the file to create');
    readln(file_name);
    writeln('Enter your text to be recorded in the file ', file_name);
    writeln('End with CTRL-Z followed by ENTER');writeln;
    assign(f, file_name);
    rewrite(f);
    repeat;
      read(c);
      write(f,c);
    until c=#26; {is equivalent to chr(26), which is CTRL-Z}
    close(f);
    writeln('Now look at the file ', file_name, ' in your directory');
    writeln;
    writeln('Reading now from disk line by line and putting on screen:');
    reset(f); {opening for reading}
    while (not eof(f)) do
      begin
        readln(f,s);
        writeln(s);
      end;
  end.
  </code></pre>
  <p>And I already searched but I didn't find anything related and I only left it to come here in the last case. If anyone can help I would appreciate it, thanks...</p>