We need a code editor that supports SAF (Storage Access Framework) to edit files inside Termux sandbox dir.

And many apps support this.

  1. Code Editor (Google Play link) uses ACE Editor under the hook. It also supports SAF.

Open Code Editor, click on the dir icon next to the edit (✏️ icon) and choose Open (SAF). From there browse to Termux and open the file you need.

Similar steps for:

  1. Open Source Acode Editor

Other apps

For other apps which don’t have File Open (SAF) menu, we may use a special File manager that supports SAF, browser to Termux and open with.

Files manager can do that!

However, you may need to test first whether the app can save your files.

PS

This Spck Editor is also a very code editor. It is available on iOS too.