software package to open .txt files?
They can be opened with StyledEdit so you donāt really need something else. What can happen is that the file is not identified as text file. In that case, you can drag it in an already opened window.
This said, you have a lot of software able to open .txt files available in the depot; it all depends your needsā¦
As Starcrasher said, StyledEdit comes with a default Haiku installation. So does Pe. And nano, if you donāt mind working in the Terminal.
But once you fire up HaikuDepot you can download <takes a deep breath>
KWrite
Notepadqq
vim
jdTextEdit
Kate
Cudatext
efte
emacs
Featherpad
jed
joe
Gvim
ne
turbo
And those are just the āpureā text editors. There are others that lean more towards being a mini-IDE (Geany, Koder, Kakoune), Markdown (CuteMarkEd, Ghostwriter, Retext) or HTML (KpimTexteditor). I may have missed one or two.
If itās just plain text, default installation gets you covered with the three applications @michel already mentioned. For general programming (in any the language), I personally use Emacs for āseriousā sessions, or jed for quick ones. Gvim/vim is also a good choice for that purpose, but Emacs is much more than just an editor/IDE. For C/C++/C#, Genio is a native Haiku choice (and itās not the only one).
But really, it all depends on your needs. None of the applications mentioned above is a ābadā choice. The best editor is the one you are used to.
You have been answered already by those much more familiar with Haiku than me, but I would add that you may find the formatting of your text files a little odd, depending on which OS the files were created in. I donāt know how Haiku treats āline endsā, as opposed to how Windows and Linux do. To mark the end of one line and to move the cursor down one space, text editors in Windows and Linux do it differently. Some do a carriage return, some do this and a āline feedā. Iām not explaining this very well, but if you find lines of text that donāt seem to end where you expect, thatās probably the cause. A decent text editor should let you format the file correctly, if itās an issue at all in Haiku.