Sunday, October 8, 2017

Re: Max chars on vim command

On Sun, Oct 8, 2017 at 6:50 PM, Ni Va <nivaemail@gmail.com> wrote:
> Hi,
>
>
> Testing this code, it appears that testlist of 10000 chars abort call.
> How is the max and how can I pass all the data by job_starting vim ?
>
> Thank you in advance.
> Niva
>
> function! awl#testfunc(arg) "{{{
> echomsg "eheh"
> echomsg string(a:arg)
> endfu
> "}}}
>
>
> " let testlist= ['1','2','3']
> let nb = 1
> let max = 10000
> let testlist=[]
> while nb < max
> call add( testlist, string(nb) )
> let nb+=1
> endwhile
> call job_start([expand('$VIMRUNTIME').'/gvim_amd64.exe', '-c', 'echo awl#testfunc('.string(testlist).')'])
>

A very long command-line is never a good idea.

If you want Vim to run something long and/or complicated, write it to
a vimscript and have Vim source that at startup.

See "-S {file}" and "-S" under ":help -S".


Best regards,
Tony.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: