blob: 56f188b2d5b814b37863feb02db54a5d3bf9af1e [file] [log] [blame]
Bram Moolenaarb1c91982018-05-17 17:04:55 +02001*hangulin.txt* For Vim version 8.1. Last change: 2015 Nov 24
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
3
4 VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam
5
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01006
Bram Moolenaar071d4272004-06-13 20:20:40 +00007Introduction *hangul*
8------------
Bram Moolenaar6aa8cea2017-06-05 14:44:35 +02009It is to input hangul, the Korean language, with Vim GUI version.
Bram Moolenaar071d4272004-06-13 20:20:40 +000010If you have a XIM program, you can use another |+xim| feature.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000011Basically, it is for anybody who has no XIM program.
Bram Moolenaar071d4272004-06-13 20:20:40 +000012
13Compile
14-------
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000015Next is a basic option. You can add any other configure option. >
Bram Moolenaar071d4272004-06-13 20:20:40 +000016
Bram Moolenaar72f4cc42015-11-10 14:35:18 +010017 ./configure --with-x --enable-multibyte --enable-hangulinput \
18 --disable-xim
Bram Moolenaar071d4272004-06-13 20:20:40 +000019
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000020And you should check feature.h. If |+hangul_input| feature is enabled
Bram Moolenaar071d4272004-06-13 20:20:40 +000021by configure, you can select more options such as keyboard type, 2 bulsik
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000022or 3 bulsik. You can find keywords like next in there. >
Bram Moolenaar071d4272004-06-13 20:20:40 +000023
24 #define HANGUL_DEFAULT_KEYBOARD 2
25 #define ESC_CHG_TO_ENG_MODE
26 /* #define X_LOCALE */
Bram Moolenaar071d4272004-06-13 20:20:40 +000027
28Environment variables
29---------------------
Bram Moolenaar72f4cc42015-11-10 14:35:18 +010030You should set LANG variable to Korean locale such as ko, ko_KR.eucKR
31or ko_KR.UTF-8.
Bram Moolenaar071d4272004-06-13 20:20:40 +000032If you set LC_ALL variable, it should be set to Korean locale also.
33
Bram Moolenaar6aa8cea2017-06-05 14:44:35 +020034Vim resource
Bram Moolenaar071d4272004-06-13 20:20:40 +000035------------
Bram Moolenaar72f4cc42015-11-10 14:35:18 +010036You may want to set 'encoding' and 'fileencodings'.
Bram Moolenaard042dc82015-11-24 19:18:36 +010037Next are examples: >
Bram Moolenaar071d4272004-06-13 20:20:40 +000038
Bram Moolenaar72f4cc42015-11-10 14:35:18 +010039 :set encoding=euc-kr
40 :set encoding=utf-8
41 :set fileencodings=ucs-bom,utf-8,cp949,euc-kr,latin1
Bram Moolenaar071d4272004-06-13 20:20:40 +000042
43Keyboard
44--------
45You can change keyboard type (2 bulsik or 3 bulsik) using VIM_KEYBOARD
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000046or HANGUL_KEYBOARD_TYPE environment variables. For sh, just do (2 bulsik): >
Bram Moolenaar071d4272004-06-13 20:20:40 +000047
48 export VIM_KEYBOARD="2"
49or >
50 export HANGUL_KEYBOARD_TYPE="2"
51
52If both are set, VIM_KEYBOARD has higher priority.
53
54Hangul Fonts
55------------
Bram Moolenaar6aa8cea2017-06-05 14:44:35 +020056If you use GTK version of gvim, you should set 'guifont' and 'guifontwide'.
Bram Moolenaard042dc82015-11-24 19:18:36 +010057For example: >
Bram Moolenaar72f4cc42015-11-10 14:35:18 +010058 set guifont=Courier\ 12
59 set guifontwide=NanumGothicCoding\ 12
60
Bram Moolenaar6aa8cea2017-06-05 14:44:35 +020061If you use Motif or Athena version of gvim, you should set 'guifontset' in
Bram Moolenaar72f4cc42015-11-10 14:35:18 +010062your vimrc. You can set fontset in the .Xdefaults file.
63
64$HOME/.gvimrc: >
65 set guifontset=english_font,hangul_font
Bram Moolenaar071d4272004-06-13 20:20:40 +000066
67$HOME/.Xdefaults: >
68 Vim.font: english_font
69
70 ! Nexts are for hangul menu with Athena
71 *international: True
72 Vim*fontSet: english_font,hangul_font
73
74 ! Nexts are for hangul menu with Motif
75 *international: True
76 Vim*fontList: english_font;hangul_font:
77
Bram Moolenaar071d4272004-06-13 20:20:40 +000078attention! the , (comma) or ; (semicolon)
79
Bram Moolenaar6aa8cea2017-06-05 14:44:35 +020080And there should be no ':set guifont'. If it exists, then gvim ignores
81':set guifontset'. It means Vim runs without fontset supporting.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000082So, you can see only English. Hangul does not be correctly displayed.
Bram Moolenaar071d4272004-06-13 20:20:40 +000083
Bram Moolenaar6aa8cea2017-06-05 14:44:35 +020084After "fontset" feature is enabled, Vim does not allow using english
Bram Moolenaar214641f2017-03-05 17:04:09 +010085font only in "font" setting for syntax.
Bram Moolenaar071d4272004-06-13 20:20:40 +000086For example, if you use >
87 :set guifontset=eng_font,your_font
88in your .gvimrc, then you should do for syntax >
89 :hi Comment guifg=Cyan font=another_eng_font,another_your_font
90If you just do >
91 :hi Comment font=another_eng_font
Bram Moolenaar72f4cc42015-11-10 14:35:18 +010092then you can see a error message. Be careful!
Bram Moolenaar071d4272004-06-13 20:20:40 +000093
94hangul_font width should be twice than english_font width.
95
96Unsupported Feature
97-------------------
Bram Moolenaar72f4cc42015-11-10 14:35:18 +010098We don't support Johab font.
99We don't support Hanja input.
100And We don't have any plan to support them.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000101
Bram Moolenaar6aa8cea2017-06-05 14:44:35 +0200102If you really need such features, you can use console version of Vim with a
Bram Moolenaar72f4cc42015-11-10 14:35:18 +0100103capable terminal emulator.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000104
105Bug or Comment
106--------------
107Send comments, patches and suggestions to:
108
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100109 SungHyun Nam <goweol@gmail.com>
Bram Moolenaar72f4cc42015-11-10 14:35:18 +0100110 Chi-Deok Hwang <...>
Bram Moolenaar071d4272004-06-13 20:20:40 +0000111
112 vim:tw=78:ts=8:ft=help:norl: