Mercurial > vim
comparison runtime/doc/eval.txt @ 17020:1841c03a9b5e v8.1.1510
patch 8.1.1510: a plugin cannot easily expand a command like done internally
commit https://github.com/vim/vim/commit/80dad48c5095d30873a42ec82628bdb213125d8e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 9 17:22:31 2019 +0200
patch 8.1.1510: a plugin cannot easily expand a command like done internally
Problem: A plugin cannot easily expand a command like done internally.
Solution: Add the expandcmd() function. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/4514)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 09 Jun 2019 17:30:04 +0200 |
parents | 353ed7ef78df |
children | 905e1b154058 |
comparison
equal
deleted
inserted
replaced
17019:9bd84943d7bd | 17020:1841c03a9b5e |
---|---|
2324 extend({expr1}, {expr2} [, {expr3}]) | 2324 extend({expr1}, {expr2} [, {expr3}]) |
2325 List/Dict insert items of {expr2} into {expr1} | 2325 List/Dict insert items of {expr2} into {expr1} |
2326 exp({expr}) Float exponential of {expr} | 2326 exp({expr}) Float exponential of {expr} |
2327 expand({expr} [, {nosuf} [, {list}]]) | 2327 expand({expr} [, {nosuf} [, {list}]]) |
2328 any expand special keywords in {expr} | 2328 any expand special keywords in {expr} |
2329 expandcmd({expr}) String expand {expr} like with `:edit` | |
2329 feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer | 2330 feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer |
2330 filereadable({file}) Number |TRUE| if {file} is a readable file | 2331 filereadable({file}) Number |TRUE| if {file} is a readable file |
2331 filewritable({file}) Number |TRUE| if {file} is a writable file | 2332 filewritable({file}) Number |TRUE| if {file} is a writable file |
2332 filter({expr1}, {expr2}) List/Dict remove items from {expr1} where | 2333 filter({expr1}, {expr2}) List/Dict remove items from {expr1} where |
2333 {expr2} is 0 | 2334 {expr2} is 0 |
4216 "$FOOBAR". | 4217 "$FOOBAR". |
4217 | 4218 |
4218 See |glob()| for finding existing files. See |system()| for | 4219 See |glob()| for finding existing files. See |system()| for |
4219 getting the raw output of an external command. | 4220 getting the raw output of an external command. |
4220 | 4221 |
4222 expandcmd({expr}) *expandcmd()* | |
4223 Expand special items in {expr} like what is done for an Ex | |
4224 command such as `:edit`. This expands special keywords, like | |
4225 with |expand()|, and environment variables, anywhere in | |
4226 {expr}. Returns the expanded string. | |
4227 Example: > | |
4228 :echo expandcmd('make %<.o') | |
4229 < | |
4221 extend({expr1}, {expr2} [, {expr3}]) *extend()* | 4230 extend({expr1}, {expr2} [, {expr3}]) *extend()* |
4222 {expr1} and {expr2} must be both |Lists| or both | 4231 {expr1} and {expr2} must be both |Lists| or both |
4223 |Dictionaries|. | 4232 |Dictionaries|. |
4224 | 4233 |
4225 If they are |Lists|: Append {expr2} to {expr1}. | 4234 If they are |Lists|: Append {expr2} to {expr1}. |