diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/builtin.txt | 83 | ||||
-rw-r--r-- | runtime/doc/digraph.txt | 3 | ||||
-rw-r--r-- | runtime/doc/usr_41.txt | 4 |
3 files changed, 90 insertions, 0 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 61010be4ef..dd4c25af70 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -185,6 +185,8 @@ 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} @@ -402,6 +404,8 @@ 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} @@ -2891,6 +2895,45 @@ getcwd([{winnr} [, {tabnr}]]) *getcwd()* Can also be used as a |method|: > GetWinnr()->getcwd() +< + +getdigraph({chars}) *getdigraph()* *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. + + 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() +< + +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. + + 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() +< getenv({name}) *getenv()* Return the value of environment variable {name}. The {name} @@ -6734,6 +6777,46 @@ setcursorcharpos({list}) Can also be used as a |method|: > 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('あ') +< + +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() +< + setenv({name}, {val}) *setenv()* Set environment variable {name} to {val}. Example: > call setenv('HOME', '/home/myhome') diff --git a/runtime/doc/digraph.txt b/runtime/doc/digraph.txt index dd7e9a331a..8b815ebee9 100644 --- a/runtime/doc/digraph.txt +++ b/runtime/doc/digraph.txt @@ -35,6 +35,9 @@ An alternative is using the 'keymap' option. < Avoid defining a digraph with '_' (underscore) as the first character, it has a special meaning in the 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. Example of the output of ":digraphs": > TH Þ 222 ss ß 223 a! à 224 a' á 225 a> â 226 a? ã 227 a: ä 228 diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index bf024315f6..42037a030b 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -964,6 +964,10 @@ Mappings: *mapping-functions* mapcheck() check if a matching mapping exists maparg() get rhs of a mapping wildmenumode() check if the wildmode is active + getdigraph() get |digraph| + getdigraphlist() get all |digraph|s + setdigraph() register |digraph| + setdigraphlist() register multiple |digraph|s Signs: *sign-functions* sign_define() define or update a sign |