With this patch:

> Patch 8.1.2012
> Problem:    More functions can be used as methods.
> Solution:   Make terminal functions usable as a method.  Fix term_getattr().
> Files:            runtime/doc/terminal.txt, src/evalfunc.c, src/terminal.c
>             src/testdir/test_mksession.vim, src/testdir/test_terminal.vim

I finished making all relevant builtin functions available as methods.
For many functions this works nicely.  For some it is not obvious what
argument to use for the base.  I tried to keep it predictable.  For some
it would just be confusing, thus I didn't add support to use the
function as a method.

Example of useful method chaining:

        call readfile("input.txt")
                \ ->filter('v:val !~ "^#"')
                \ ->map('toupper(v:val)')
                \ ->writefile("output.txt")

Let me know if you think using some builtin functions as a method
doesn't work predictably.

-- 
hundred-and-one symptoms of being an internet addict:
224. You set up your own Web page. You set up a Web page for each
     of your kids... and your pets.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201909082020.x88KKe4C013863%40masaka.moolenaar.net.

Raspunde prin e-mail lui