-*options.txt* For Vim version 7.4. Last change: 2016 Mar 08
+*options.txt* For Vim version 7.4. Last change: 2016 Mar 19
VIM REFERENCE MANUAL by Bram Moolenaar
:se[t] {option}:{value}
Set string or number option to {value}.
For numeric options the value can be given in decimal,
- hex (preceded with 0x) or octal (preceded with '0').
+ hex (preceded with 0x) or octal (preceded with '0').
The old value can be inserted by typing 'wildchar' (by
default this is a <Tab> or CTRL-E if 'compatible' is
set). See |cmdline-completion|.
- The backup file will be created in the first directory in the list
where this is possible. The directory must exist, Vim will not
create it for you.
- - Empty means that no backup file will be created ( 'patchmode' is
+ - Empty means that no backup file will be created ('patchmode' is
impossible!). Writing may fail because of this.
- A directory "." means to put the backup file in the same directory
as the edited file.
when CTRL-P or CTRL-N are used. It is also used for whole-line
completion |i_CTRL-X_CTRL-L|. It indicates the type of completion
and the places to scan. It is a comma separated list of flags:
- . scan the current buffer ( 'wrapscan' is ignored)
+ . scan the current buffer ('wrapscan' is ignored)
w scan buffers from other windows
b scan other loaded buffers that are in the buffer list
u scan the unloaded buffers that are in the buffer list
also 'gdefault' option.
Switching this option on is discouraged!
+ *'emoji'* *'emo'*
+'emoji' 'emo' boolean (default: on)
+ global
+ {not in Vi}
+ {only available when compiled with the |+multi_byte|
+ feature}
+ When on all Unicode emoji characters are considered to be full width.
+
+
*'encoding'* *'enc'* *E543*
'encoding' 'enc' string (default: "latin1" or value from $LANG)
global
The same applies to the modeless selection.
*'go-P'*
'P' Like autoselect but using the "+ register instead of the "*
- register.
+ register.
*'go-A'*
'A' Autoselect for the modeless selection. Like 'a', but only
applies to the modeless selection.
reset this option. |-u| |--noplugin|
*'luadll'*
-'luadll' string (default depends on the build)
+'luadll' string (default depends on the build)
global
{not in Vi}
{only available when compiled with the |+lua/dyn|
respectively; see |CTRL-A| for more info on these commands.
alpha If included, single alphabetical characters will be
incremented or decremented. This is useful for a list with a
- letter index a), b), etc. *octal-nrformats*
+ letter index a), b), etc. *octal-nrformats*
octal If included, numbers that start with a zero will be considered
to be octal. Example: Using CTRL-A on "007" results in "010".
hex If included, numbers starting with "0x" or "0X" will be
relative to the cursor. Together with 'number' there are these
four combinations (cursor in line 3):
- 'nonu' 'nu' 'nonu' 'nu'
+ 'nonu' 'nu' 'nonu' 'nu'
'nornu' 'nornu' 'rnu' 'rnu'
|apple | 1 apple | 2 apple | 2 apple
this doesn't work when $INCL contains a comma or white space.
*'perldll'*
-'perldll' string (default depends on the build)
+'perldll' string (default depends on the build)
global
{not in Vi}
{only available when compiled with the |+perl/dyn|
|ins-completion-menu|.
*'pythondll'*
-'pythondll' string (default depends on the build)
+'pythondll' string (default depends on the build)
global
{not in Vi}
{only available when compiled with the |+python/dyn|
The 'rightleft' option must be set for 'rightleftcmd' to take effect.
*'rubydll'*
-'rubydll' string (default: depends on the build)
+'rubydll' string (default: depends on the build)
global
{not in Vi}
{only available when compiled with the |+ruby/dyn|
mapping which should not change the tagstack.
*'tcldll'*
-'tcldll' string (default depends on the build)
+'tcldll' string (default depends on the build)
global
{not in Vi}
{only available when compiled with the |+tcl/dyn|
{not in Vi}
Encoding used for the terminal. This specifies what character
encoding the keyboard produces and the display will understand. For
- the GUI it only applies to the keyboard ( 'encoding' is used for the
+ the GUI it only applies to the keyboard ('encoding' is used for the
display). Except for the Mac when 'macatsui' is off, then
'termencoding' should be "macroman".
*E617*
wincmd p
endfunc
+" Build the amoji width table in a new buffer.
+func! BuildEmojiTable(pattern, tableName)
+ let ranges = []
+ for line in map(filter(filter(getline(1, '$'), 'v:val=~"^[1-9]"'), 'v:val=~a:pattern'), 'matchstr(v:val,"^\\S\\+")')
+ let token = split(line, '\.\.')
+ if len(token) == 1
+ call add(token, token[0])
+ endif
+ call add(ranges, printf("\t{0x%04x, 0x%04x},", "0x".token[0], "0x".token[1]))
+ endfor
+
+ " New buffer to put the result in.
+ new
+ exe "file " . a:tableName
+ call setline(1, " static struct interval " . a:tableName . "[] =")
+ call setline(2, " {")
+ call append('$', ranges)
+ call setline('$', getline('$')[:-2]) " remove last comma
+ call setline(line('$') + 1, " };")
+ wincmd p
+endfunc
" Try to avoid hitting E36
set equalalways
" Build the ambiguous width table.
call BuildWidthTable('A', 'ambiguous')
+
+" Edit the emoji text file. Requires the netrw plugin.
+edit http://www.unicode.org/Public/emoji/3.0/emoji-data.txt
+
+" Build the emoji table. Ver. 1.0 - 6.0
+call BuildEmojiTable('; Emoji\s\+# [1-6]\.[0-9]', 'emoji')
{"edcompatible","ed", P_BOOL|P_VI_DEF,
(char_u *)&p_ed, PV_NONE,
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"emoji", "emo", P_BOOL|P_VI_DEF|P_RCLR,
+#if defined(FEAT_MBYTE)
+ (char_u *)&p_emoji, PV_NONE,
+ {(char_u *)TRUE, (char_u *)0L}
+#else
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+#endif
+ SCRIPTID_INIT},
{"encoding", "enc", P_STRING|P_VI_DEF|P_RCLR|P_NO_ML,
#ifdef FEAT_MBYTE
(char_u *)&p_enc, PV_NONE,
/* 'ambiwidth' */
#ifdef FEAT_MBYTE
- else if (varp == &p_ambw)
+ else if (varp == &p_ambw || varp == &p_emoji)
{
if (check_opt_strings(p_ambw, p_ambw_values, FALSE) != OK)
errmsg = e_invarg;