Yegappan Lakshmanan wrote:

> On Sun, Jan 8, 2017 at 9:12 AM, Bram Moolenaar <[email protected]> wrote:
> >
> > Yegappan wrote:
> >
> >> On Sun, Jan 8, 2017 at 4:26 AM, Bram Moolenaar <[email protected]> wrote:
> >> >
> >> > Patch 8.0.0151
> >> > Problem:    To pass buffer content to system() and systemlist() one has 
> >> > to
> >> >             first create a string or list.
> >> > Solution:   Allow passing a buffer number. (LemonBoy, closes #1240)
> >> >
> >>
> >> Currently only the entire buffer can be used to the external command.
> >> Does it make sense to also support specifying a range of lines to
> >> be passed to the command? The default is the entire buffer.
> >
> > Yeah, I also wondered if that would be useful.  In case it is, we could
> > pass a dict argument with the range.
> >         {'bufnr': bufnr('%'), 'start': 2, 'end': line('$') - 1}
> >
> 
> I was thinking more along the lines of
> 
>      system("cmd", bufnr, begin_lnum, end_lnum)
> 
> The attached patch implements this.

The problem with this is if we ever want to pass another argument it
would require to pass the begin and end line numbers.  Or also allow for
a dict argument somehow.  Anyway, this quickly gets messy.


-- 
hundred-and-one symptoms of being an internet addict:
230. You spend your Friday nights typing away at your keyboard

 /// 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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui