mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 01:16:31 +00:00
support for :perl, :perlfile, :perldo and perleval()
This commit is contained in:
@@ -256,6 +256,7 @@ return {
|
||||
py3eval={args=1},
|
||||
pyeval={args=1},
|
||||
pyxeval={args=1},
|
||||
perleval={args=1},
|
||||
range={args={1, 3}},
|
||||
readdir={args={1, 2}},
|
||||
readfile={args={1, 3}},
|
||||
|
@@ -6374,6 +6374,14 @@ static void f_pyxeval(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// "perleval()" function
|
||||
///
|
||||
static void f_perleval(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
{
|
||||
script_host_eval("perl", argvars, rettv);
|
||||
}
|
||||
|
||||
/*
|
||||
* "range()" function
|
||||
*/
|
||||
|
@@ -1927,13 +1927,19 @@ return {
|
||||
command='perl',
|
||||
flags=bit.bor(RANGE, EXTRA, DFLALL, NEEDARG, SBOXOK, CMDWIN, RESTRICT),
|
||||
addr_type=ADDR_LINES,
|
||||
func='ex_script_ni',
|
||||
func='ex_perl',
|
||||
},
|
||||
{
|
||||
command='perldo',
|
||||
flags=bit.bor(RANGE, EXTRA, DFLALL, NEEDARG, CMDWIN, RESTRICT),
|
||||
addr_type=ADDR_LINES,
|
||||
func='ex_ni',
|
||||
func='ex_perldo',
|
||||
},
|
||||
{
|
||||
command='perlfile',
|
||||
flags=bit.bor(RANGE, FILE1, NEEDARG, CMDWIN, RESTRICT),
|
||||
addr_type=ADDR_LINES,
|
||||
func='ex_perlfile',
|
||||
},
|
||||
{
|
||||
command='pedit',
|
||||
|
@@ -935,6 +935,21 @@ void ex_pydo3(exarg_T *eap)
|
||||
script_host_do_range("python3", eap);
|
||||
}
|
||||
|
||||
void ex_perl(exarg_T *eap)
|
||||
{
|
||||
script_host_execute("perl", eap);
|
||||
}
|
||||
|
||||
void ex_perlfile(exarg_T *eap)
|
||||
{
|
||||
script_host_execute_file("perl", eap);
|
||||
}
|
||||
|
||||
void ex_perldo(exarg_T *eap)
|
||||
{
|
||||
script_host_do_range("perl", eap);
|
||||
}
|
||||
|
||||
// Command line expansion for :profile.
|
||||
static enum {
|
||||
PEXP_SUBCMD, ///< expand :profile sub-commands
|
||||
|
Reference in New Issue
Block a user