summaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorh-east <h.east.727@gmail.com>2021-07-26 21:54:04 +0200
committerBram Moolenaar <Bram@vim.org>2021-07-26 21:54:04 +0200
commit29b857150c111a455f1a38a8f748243524f692e1 (patch)
tree461095b2d225d6bc7d2bf62abc12c66071823e5b /runtime/doc
parentccb148ac63941feba879ea4678aa4713d81494f2 (diff)
downloadvim-git-29b857150c111a455f1a38a8f748243524f692e1.tar.gz
patch 8.2.3226: new digraph functions use old naming schemev8.2.3226
Problem: New digraph functions use old naming scheme. Solution: Use the digraph_ prefix. (Hirohito Higashi, closes #8580)
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/digraph.txt2
-rw-r--r--runtime/doc/eval.txt211
-rw-r--r--runtime/doc/usr_41.txt8
3 files changed, 110 insertions, 111 deletions
diff --git a/runtime/doc/digraph.txt b/runtime/doc/digraph.txt
index 9715a8846..bfcf1350b 100644
--- a/runtime/doc/digraph.txt
+++ b/runtime/doc/digraph.txt
@@ -40,7 +40,7 @@ An alternative is using the 'keymap' option.
future.
NOTE: This command cannot add a digraph that starts
with a white space. If you want to add such digraph,
- you can use |setdigraph()| instead.
+ you can use |digraph_set()| instead.
Vim is normally compiled with the |+digraphs| feature. If the feature is
disabled, the ":digraph" command will display an error message.
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index f4ab159a7..d5f5e8de5 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2548,6 +2548,10 @@ deletebufline({expr}, {first} [, {last}])
did_filetype() Number |TRUE| if FileType autocmd event used
diff_filler({lnum}) Number diff filler lines about {lnum}
diff_hlID({lnum}, {col}) Number diff highlighting at {lnum}/{col}
+digraph_get({chars}) String get the digraph of {chars}
+digraph_getlist([{listall}]) List get all |digraph|s
+digraph_set({chars}, {digraph}) Boolean register |digraph|
+digraph_setlist({digraphlist}) Boolean register multiple |digraph|s
echoraw({expr}) none output {expr} as-is
empty({expr}) Number |TRUE| if {expr} is empty
environ() Dict return environment variables
@@ -2620,8 +2624,6 @@ getcompletion({pat}, {type} [, {filtered}])
getcurpos([{winnr}]) List position of the cursor
getcursorcharpos([{winnr}]) List character position of the cursor
getcwd([{winnr} [, {tabnr}]]) String get the current working directory
-getdigraph({chars}) String get the digraph of {chars}
-getdigraphlist([{listall}]) List get all |digraph|s
getenv({name}) String return environment variable
getfontname([{name}]) String name of font being used
getfperm({fname}) String file permissions of file {fname}
@@ -2888,8 +2890,6 @@ setcharpos({expr}, {list}) Number set the {expr} position to {list}
setcharsearch({dict}) Dict set character search from {dict}
setcmdpos({pos}) Number set cursor position in command-line
setcursorcharpos({list}) Number move cursor to position in {list}
-setdigraph({chars}, {digraph}) Boolean register |digraph|
-setdigraphlist({digraphlist}) Boolean register multiple |digraph|s
setenv({name}, {val}) none set environment variable
setfperm({fname}, {mode}) Number set {fname} file permissions to {mode}
setline({lnum}, {line}) Number set line {lnum} to {line}
@@ -4198,6 +4198,107 @@ diff_hlID({lnum}, {col}) *diff_hlID()*
Can also be used as a |method|: >
GetLnum()->diff_hlID(col)
+<
+
+digraph_get({chars}) *digraph_get()* *E1214*
+ Return the digraph of {chars}. This should be a string with
+ exactly two characters. If {chars} are not just two
+ characters, or the digraph of {chars} does not exist, an error
+ is given and an empty string is returned.
+
+ The character will be converted from Unicode to 'encoding'
+ when needed. This does require the conversion to be
+ available, it might fail.
+
+ Also see |digraph_getlist()|.
+
+ Examples: >
+ " Get a built-in digraph
+ :echo digraph_get('00') " Returns '∞'
+
+ " Get a user-defined digraph
+ :call digraph_set('aa', 'あ')
+ :echo digraph_get('aa') " Returns 'あ'
+<
+ Can also be used as a |method|: >
+ GetChars()->digraph_get()
+<
+ This function works only when compiled with the |+digraphs|
+ feature. If this feature is disabled, this function will
+ display an error message.
+
+
+digraph_getlist([{listall}]) *digraph_getlist()*
+ Return a list of digraphs. If the {listall} argument is given
+ and it is TRUE, return all digraphs, including the default
+ digraphs. Otherwise, return only user-defined digraphs.
+
+ The characters will be converted from Unicode to 'encoding'
+ when needed. This does require the conservation to be
+ available, it might fail.
+
+ Also see |digraph_get()|.
+
+ Examples: >
+ " Get user-defined digraphs
+ :echo digraph_getlist()
+
+ " Get all the digraphs, including default digraphs
+ :echo digraph_getlist(1)
+<
+ Can also be used as a |method|: >
+ GetNumber()->digraph_getlist()
+<
+ This function works only when compiled with the |+digraphs|
+ feature. If this feature is disabled, this function will
+ display an error message.
+
+
+digraph_set({chars}, {digraph}) *digraph_set()* *E1205*
+ Add digraph {chars} to the list. {chars} must be a string
+ with two characters. {digraph} is a string with one utf-8
+ encoded character. Be careful, composing characters are NOT
+ ignored. This function is similar to |:digraphs| command, but
+ useful to add digraphs start with a white space.
+
+ The function result is v:true if |digraph| is registered. If
+ this fails an error message is given and v:false is returned.
+
+ If you want to define multiple digraphs at once, you can use
+ |digraph_setlist()|.
+
+ Example: >
+ call digraph_set(' ', 'あ')
+<
+ Can be used as a |method|: >
+ GetString()->digraph_set('あ')
+<
+ This function works only when compiled with the |+digraphs|
+ feature. If this feature is disabled, this function will
+ display an error message.
+
+
+digraph_setlist({digraphlist}) *digraph_setlist()*
+ Similar to |digraph_set()| but this function can add multiple
+ digraphs at once. {digraphlist} is a list composed of lists,
+ where each list contains two strings with {chars} and
+ {digraph} as in |digraph_set()|.
+ Example: >
+ call digraph_setlist([['aa', 'あ'], ['ii', 'い']])
+<
+ It is similar to the following: >
+ for [chars, digraph] in [['aa', 'あ'], ['ii', 'い']]
+ call digraph_set(chars, digraph)
+ endfor
+< Except that the function returns after the first error,
+ following digraphs will not be added.
+
+ Can be used as a |method|: >
+ GetList()->digraph_setlist()
+<
+ This function works only when compiled with the |+digraphs|
+ feature. If this feature is disabled, this function will
+ display an error message.
echoraw({expr}) *echoraw()*
@@ -5575,61 +5676,6 @@ getcwd([{winnr} [, {tabnr}]])
< Can also be used as a |method|: >
GetWinnr()->getcwd()
-<
- *getdigraph()* *E1214*
-getdigraph({chars})
- Return the digraph of {chars}. This should be a string with
- exactly two characters. If {chars} are not just two
- characters, or the digraph of {chars} does not exist, an error
- is given and an empty string is returned.
-
- The character will be converted from Unicode to 'encoding'
- when needed. This does require the conversion to be
- available, it might fail.
-
- Also see |getdigraphlist()|.
-
- Examples: >
- " Get a built-in digraph
- :echo getdigraph('00') " Returns '∞'
-
- " Get a user-defined digraph
- :call setdigraph('aa', 'あ')
- :echo getdigraph('aa') " Returns 'あ'
-<
- Can also be used as a |method|: >
- GetChars()->getdigraph()
-<
- This function works only when compiled with the |+digraphs|
- feature. If this feature is disabled, this function will
- display an error message.
-
-
-getdigraphlist([{listall}]) *getdigraphlist()*
- Return a list of digraphs. If the {listall} argument is given
- and it is TRUE, return all digraphs, including the default
- digraphs. Otherwise, return only user-defined digraphs.
-
- The characters will be converted from Unicode to 'encoding'
- when needed. This does require the conservation to be
- available, it might fail.
-
- Also see |getdigraph()|.
-
- Examples: >
- " Get user-defined digraphs
- :echo getdigraphlist()
-
- " Get all the digraphs, including default digraphs
- :echo digraphlist(1)
-<
- Can also be used as a |method|: >
- GetNumber()->getdigraphlist()
-<
- This function works only when compiled with the |+digraphs|
- feature. If this feature is disabled, this function will
- display an error message.
-
getenv({name}) *getenv()*
Return the value of environment variable {name}.
@@ -9550,53 +9596,6 @@ setcursorcharpos({list})
GetCursorPos()->setcursorcharpos()
-setdigraph({chars}, {digraph}) *setdigraph()* *E1205*
- Add digraph {chars} to the list. {chars} must be a string
- with two characters. {digraph} is a string with one utf-8
- encoded character. Be careful, composing characters are NOT
- ignored. This function is similar to |:digraphs| command, but
- useful to add digraphs start with a white space.
-
- The function result is v:true if |digraph| is registered. If
- this fails an error message is given and v:false is returned.
-
- If you want to define multiple digraphs at once, you can use
- |setdigraphlist()|.
-
- Example: >
- call setdigraph(' ', 'あ')
-<
- Can be used as a |method|: >
- GetString()->setdigraph('あ')
-<
- This function works only when compiled with the |+digraphs|
- feature. If this feature is disabled, this function will
- display an error message.
-
-
-setdigraphlist({digraphlist}) *setdigraphlist()*
- Similar to |setdigraph()| but this function can add multiple
- digraphs at once. {digraphlist} is a list composed of lists,
- where each list contains two strings with {chars} and
- {digraph} as in |setdigraph()|.
- Example: >
- call setdigraphlist([['aa', 'あ'], ['ii', 'い']])
-<
- It is similar to the following: >
- for [chars, digraph] in [['aa', 'あ'], ['ii', 'い']]
- call setdigraph(chars, digraph)
- endfor
-< Except that the function returns after the first error,
- following digraphs will not be added.
-
- Can be used as a |method|: >
- GetList()->setdigraphlist()
-<
- This function works only when compiled with the |+digraphs|
- feature. If this feature is disabled, this function will
- display an error message.
-
-
setenv({name}, {val}) *setenv()*
Set environment variable {name} to {val}.
When {val} is |v:null| the environment variable is deleted.
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index df9ebe639..2651bb8a1 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -994,16 +994,16 @@ Window size and position: *window-size-functions*
winrestview() restore saved view of current window
Mappings and Menus: *mapping-functions*
+ digraph_get() get |digraph|
+ digraph_getlist() get all |digraph|s
+ digraph_set() register |digraph|
+ digraph_setlist() register multiple |digraph|s
hasmapto() check if a mapping exists
mapcheck() check if a matching mapping exists
maparg() get rhs of a mapping
mapset() restore a mapping
menu_info() get information about a menu item
wildmenumode() check if the wildmode is active
- getdigraph() get |digraph|
- getdigraphlist() get all |digraph|s
- setdigraph() register |digraph|
- setdigraphlist() register multiple |digraph|s
Testing: *test-functions*
assert_equal() assert that two expressions values are equal