Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to write a golfing library for postscript. But it needs to be condensed itself. So I need a convenient way to type-in arbitrary bytes within mostly ascii text.

I know this can easily be done with absolutely any programming language, but can I do it in vi? (:help octal was no help).

share|improve this question
If Vim is available, this might help –  sr_ Jan 13 '13 at 9:53

1 Answer 1

up vote 1 down vote accepted

I assume that you use vim, because :helpoctal is a vim's command. On some systems vi is just a symlink to vim which runs it in vi-compatible mode.

In vim:

  • You can enter unicode characters from basic multilingual plane you can use:
    Press ctrl+v and then enter four digit hex unicode code.
  • Another option is digraphs. You can read more about them in vim's help (help: dig).
    Press ctrl+k and then two-character sequence.
    You can list sequences supported in you vim usig command :digraph .

In nvi, vi and elsewhere:

  • Ctrl+Shift and hit U and then enter unicode hex code.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.