Personally, I prefer to use something such as Encryptpad (https://evpo.net/encryptpad/) for editing files that should remain encrypted as much as practical.
For one thing, ed creates tmp files which I would guess would be, if x/X were reincarnated, unencrypted and visible in the user's tmp directory. Back in the days when RAM was measured in kbytes, this made sense. Now RAM is measured in gbytes, and a tool such as encryptpad never needs to deliberately stash the unencrypted data on disk (swap files and memory dumps on crash can still leak clear text to disk). In addition, since encryptpad focuses on this problem, it has a richer feature set focused on securely editing encrypted data. Mostly the above is "just me" expressing disinterest. However it might not be a good idea to unleash a "secure editing of encrypted data" option, that can be so easily compromised. This could lead to some users unwittingly exposing secret data in a way that they wouldn't want to. -- Paul Jackson p...@usa.net