enter utf-8 symbols

191 views
Skip to first unread message

Oleg Puchinin

unread,
Jun 12, 2011, 9:13:12 AM6/12/11
to vim-mu...@vim.org
Hello !
Is it possible to enter characters UTF-8 on the code? For example some
command? Say - entered the command with the correct hex code and got
the correct character?

Best regards,
Oleg.

mattn

unread,
Jun 12, 2011, 11:00:33 PM6/12/11
to vim_mu...@googlegroups.com, vim-mu...@vim.org
Do you mean that you want to input utf-8 text without IME(Input Method Editor)?


ZyX

unread,
Jun 12, 2011, 11:37:03 PM6/12/11
to vim_mu...@googlegroups.com
Ответ на сообщение «enter utf-8 symbols»,
присланное в 17:13:12 12 июня 2011, Воскресенье.
Отправитель: Oleg Puchinin:

> Is it possible to enter characters UTF-8 on the code? For example some
> command? Say - entered the command with the correct hex code and got
> the correct character?

Yes. Some methods (X means «hex character»):
<C-v>xXX
<C-v>uXXXX
<C-v>UXXXXXXXX
<C-r>="\uXXXX"<CR>
<C-r>=nr2char(0xX...)<CR>
(All meant to be run from insert or command mode. In second case input will go
to the command line.)

Текст сообщения:

signature.asc

Tony Mechelynck

unread,
Jun 12, 2011, 11:22:27 PM6/12/11
to vim_mu...@googlegroups.com, Oleg Puchinin

:help i_CTRL-V_digit (and even though it starts with i_ it also applies
to Command-line mode).

See also http://vim.wikia.com/wiki/Entering_special_characters


HTH,
Tony.
--
This is for all ill-treated fellows
Unborn and unbegot,
For them to read when they're in trouble
And I am not.
-- A. E. Housman

Oleg Puchinin

unread,
Jun 13, 2011, 4:21:07 AM6/13/11
to vim_mu...@googlegroups.com
Thank you, very much !!!

2011/6/13 ZyX <zyx...@gmail.com>:

Reply all
Reply to author
Forward
0 new messages