Inserting a control character in a text file?

Karl Auer kauer at
Thu Sep 13 00:50:48 UTC 2007

On Wed, 2007-09-12 at 20:38 -0400, Pete Holsberg wrote:
> I need to produce a text file that contains the ASCII character ESC
> (1BH or 027 decimal).
> How do I do that wit, say, vim?

In insert mode, type CTL-V then ESC. Then ESC again to exit insert mode.
You should see "^]" in your text.

Regards, K.

Karl Auer (kauer at                   +61-2-64957160 (h)                  +61-428-957160 (mob)

More information about the ubuntu-users mailing list