Unicode Vim

Unicode → UnicodeVim

In Kürze

Englisch: Working with Unicode

url: http://vim.sourceforge.net/tips/tip.php?tip_id=246

basic Tip #246: Working with Unicode (the same, rewritten for legibility)
tip karma   Rating 119/46, Viewed by 3166
 
created:   May 10, 2002 16:19      complexity:   basic
author:    Tony Mechelynck         as of Vim:    6.0

Where to look for help

:h utf8
:h encoding-values
:h 'enc'
:h 'fenc'
:h 'fencs'
:h 'tenc'
:h 'bomb'
:h 'guifont'
:h ga
:h g8
:h :dig
:h i_Ctrl-V_digit
:h has()

What to do (These are examples. Modify them to suit your work environment.)

if has("multi_byte")
     set encoding=utf-8
     setglobal fileencoding=utf-8
     set bomb
     set termencoding=iso-8859-15
     set fileencodings=ucs-bom,iso-8859-15,iso-8859-3,utf-8
else
     echoerr "Sorry, this version of (g)vim was not compiled with +multi_byte"
endif

What the above does

Additional remarks

In "insert" or "replace" mode:

...

Happy Vimming ! Tony.