You can simply use gpg or openssl to encrypt your a single text file.
gpg -cipher-algo <cipher-algorithm> -c /path/to/file
List of posiible cipher can be known from gpg --help
openssl enc <cipher-algorithm> -in /path/to/file -out /path/to/encrypted/file
List of possible ciphers can be known via openssl enc -list.
No idea about integreted text ...
7zip encryption is pretty bad from a security perspective (missing salt, self-made key derivation...), see e.g. this review.
I don't know of any program that encrypts files and has an integrated text editor, but there are numerous programs for encrypting individual files: Cryptomator, AES Crypt, File Lock PEA, EncFS...