displaying only works for the characters present in the
selected font.
Useful commands:
- "ga" shows the decimal, hexadecimal and octal value of the character under
the cursor. If there are composing characters these are shown too. (If the
message is truncated, use ":messages").
- "g8" shows the bytes used in a UTF-8 character, also the composing
characters, as hex numbers.
- ":set fileencodings=" forces using UTF-8 for all files. The
default is to automatically detect the encoding of a file.
STARTING VIM
You might want to select the font used for the menus. Unfortunately this
doesn't always work. See the system specific remarks below, and 'langmenu'.
USING UTF-8 IN X-WINDOWS *utf-8-in-xwindows*
You need to specify a font to be used. For double-wide characters another
font is required, which is exactly twice as wide. There are three ways to do
this:
1. Set 'guifont' and let Nvim find a matching 'guifontwide'
2. Set 'guifont' and 'guifontwide'
See the documentation for each option for details. Example: >
:set guifont=-misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1
You might also want to set the font used for the menus. This only works for
Motif. Use the ":hi Menu font={fontname}" command for this. |:highlight|
TYPING UTF-8 *utf-8-typing*
If you are using X-Windows, you should find an input method that supports
UTF-8.
If your system does not provide support for typing UTF-8, you can use the
'keymap' feature. This allows writing a keymap file, which defines a UTF-8
character as a sequence of ASCII characters. See |mbyte-keymap|.
If everything else fails, you can type any character as four hex bytes: >
CTRL-V u 1234
"1234" is interpreted as a hex number. You must type four characters, prepend
a zero if necessary.
COMMAND ARGUMENTS *utf-8-char-arg*
Commands like |f|, |F|, |t| and |r| take an argument of one character. For
UTF-8 this argument may include one or two composing characters. These need
to be produced together with the base character, Nvim doesn't wait for the next
character to be typed to find out if it is a composing character or not.
Using 'keymap' or |:lmap| is a nice way to type these characters.
The commands that search for a character in a line handle composing characters
as follows. When searching for a character without a composing character,
this will find matches in the text with or without composing characters. When
searching for a character with a composing character, this will only find
matches with that composing character. It was implemented this way, because
not everybody is able to type a composing character.
==============================================================================
Overview of options *mbyte-options*
These options are relevant for editing multibyte files.
'fileencoding' Encoding of a file. When it's different from "utf-8"
conversion is done when reading or writing the file.
'fileencodings' List of possible encodings of a file. When opening a file
these will be tried and the first one that doesn't cause an
error is used for 'fileencoding'.
'charconvert' Expression used to convert files from one encoding to another.
'formatoptions' The 'm' flag can be included to have formatting break a line
at a multibyte character of 256 or higher. Thus is useful for
languages where a sequence of characters can be broken
anywhere.
'keymap' Specify the name of a keyboard mapping.
==============================================================================
Contributions specifically for the multibyte features by:
Chi-Deok Hwang <hwang@mizi.co.kr>
SungHyun Nam <goweol@gmail.com>
K.Nagano <nagano@atese.advantest.co.jp>
Taro Muraoka <koron@tka.att.ne.jp>
Yasuhiro Matsumoto <mattn@mail.goo.ne.jp>
vim:tw=78:ts=8:noet:ft=help:norl: