@@ -2632,6 +2632,8 @@ getcompletion({pat}, {type} [, {filtered}])
26322632getcurpos([{winnr}]) List position of the cursor
26332633getcursorcharpos([{winnr}]) List character position of the cursor
26342634getcwd([{winnr} [, {tabnr}]]) String get the current working directory
2635+ getdigraph({chars}) String get the digraph of {chars}
2636+ getdigraphlist([{listall}]) List get all |digraph|s
26352637getenv({name}) String return environment variable
26362638getfontname([{name}]) String name of font being used
26372639getfperm({fname}) String file permissions of file {fname}
@@ -2898,6 +2900,8 @@ setcharpos({expr}, {list}) Number set the {expr} position to {list}
28982900setcharsearch({dict}) Dict set character search from {dict}
28992901setcmdpos({pos}) Number set cursor position in command-line
29002902setcursorcharpos({list}) Number move cursor to position in {list}
2903+ setdigraph({chars}, {digraph}) Boolean register |digraph|
2904+ setdigraphlist({digraphlist}) Boolean register multiple |digraph|s
29012905setenv({name}, {val}) none set environment variable
29022906setfperm({fname}, {mode}) Number set {fname} file permissions to {mode}
29032907setline({lnum}, {line}) Number set line {lnum} to {line}
@@ -5584,6 +5588,61 @@ getcwd([{winnr} [, {tabnr}]])
55845588< Can also be used as a |method|: >
55855589 GetWinnr()->getcwd()
55865590<
5591+ *getdigraph()* *E1214*
5592+ getdigraph({chars})
5593+ Return the digraph of {chars}. This should be a string with
5594+ exactly two characters. If {chars} are not just two
5595+ characters, or the digraph of {chars} does not exist, an error
5596+ is given and an empty string is returned.
5597+
5598+ The character will be converted from Unicode to 'encoding'
5599+ when needed. This does require the conversion to be
5600+ available, it might fail.
5601+
5602+ Also see |getdigraphlist()|.
5603+
5604+ Examples: >
5605+ " Get a built-in digraph
5606+ :echo getdigraph('00') " Returns '∞'
5607+
5608+ " Get a user-defined digraph
5609+ :call setdigraph('aa', 'あ')
5610+ :echo getdigraph('aa') " Returns 'あ'
5611+ <
5612+ Can also be used as a |method|: >
5613+ GetChars()->getdigraph()
5614+ <
5615+ This function works only when compiled with the |+digraphs|
5616+ feature. If this feature is disabled, this function will
5617+ display an error message.
5618+
5619+
5620+ getdigraphlist([{listall}]) *getdigraphlist()*
5621+ Return a list of digraphs. If the {listall} argument is given
5622+ and it is TRUE, return all digraphs, including the default
5623+ digraphs. Otherwise, return only user-defined digraphs.
5624+
5625+ The characters will be converted from Unicode to 'encoding'
5626+ when needed. This does require the conservation to be
5627+ available, it might fail.
5628+
5629+ Also see |getdigraph()|.
5630+
5631+ Examples: >
5632+ " Get user-defined digraphs
5633+ :echo getdigraphlist()
5634+
5635+ " Get all the digraphs, including default digraphs
5636+ :echo digraphlist(1)
5637+ <
5638+ Can also be used as a |method|: >
5639+ GetNumber()->getdigraphlist()
5640+ <
5641+ This function works only when compiled with the |+digraphs|
5642+ feature. If this feature is disabled, this function will
5643+ display an error message.
5644+
5645+
55875646getenv({name}) *getenv()*
55885647 Return the value of environment variable {name}.
55895648 When the variable does not exist |v:null| is returned. That
@@ -9502,6 +9561,54 @@ setcursorcharpos({list})
95029561 Can also be used as a |method|: >
95039562 GetCursorPos()->setcursorcharpos()
95049563
9564+
9565+ setdigraph({chars}, {digraph}) *setdigraph()* *E1205*
9566+ Add digraph {chars} to the list. {chars} must be a string
9567+ with two characters. {digraph} is a string with one utf-8
9568+ encoded character. Be careful, composing characters are NOT
9569+ ignored. This function is similar to |:digraphs| command, but
9570+ useful to add digraphs start with a white space.
9571+
9572+ The function result is v:true if |digraph| is registered. If
9573+ this fails an error message is given and v:false is returned.
9574+
9575+ If you want to define multiple digraphs at once, you can use
9576+ |setdigraphlist()|.
9577+
9578+ Example: >
9579+ call setdigraph(' ', 'あ')
9580+ <
9581+ Can be used as a |method|: >
9582+ GetString()->setdigraph('あ')
9583+ <
9584+ This function works only when compiled with the |+digraphs|
9585+ feature. If this feature is disabled, this function will
9586+ display an error message.
9587+
9588+
9589+ setdigraphlist({digraphlist}) *setdigraphlist()*
9590+ Similar to |setdigraph()| but this function can add multiple
9591+ digraphs at once. {digraphlist} is a list composed of lists,
9592+ where each list contains two strings with {chars} and
9593+ {digraph} as in |setdigraph()|.
9594+ Example: >
9595+ call setdigraphlist([['aa', 'あ'], ['ii', 'い']])
9596+ <
9597+ It is similar to the following: >
9598+ for [chars, digraph] in [['aa', 'あ'], ['ii', 'い']]
9599+ call setdigraph(chars, digraph)
9600+ endfor
9601+ < Except that the function returns after the first error,
9602+ following digraphs will not be added.
9603+
9604+ Can be used as a |method|: >
9605+ GetList()->setdigraphlist()
9606+ <
9607+ This function works only when compiled with the |+digraphs|
9608+ feature. If this feature is disabled, this function will
9609+ display an error message.
9610+
9611+
95059612setenv({name}, {val}) *setenv()*
95069613 Set environment variable {name} to {val}.
95079614 When {val} is |v:null| the environment variable is deleted.
0 commit comments