Marcin Szamotulski wrote: > On 15:15 Wed 30 Jul , Marcin Szamotulski wrote: > > On 12:53 Wed 30 Jul , Bram Moolenaar wrote: > > > > > > Marcin Szamotulski wrote: > > > > > > > I wrote a patch to reuse an argument list from different window. > > > > I think it is useful to have a way of setting an argument list from > > > > a different window [tab page]. One scenario where it is useful is when > > > > a window has global argument list and one makes a ':split|argl' and > > > > after a while one would like to reuse the new local argument list > > > > somewhere > > > > else. With the attached patch one can: > > > > > > > > :call usearglist({winnr} [, {tabnr}]) > > > > > > > > to use the argument list from window number {winnr} (in tab page > > > > {tabnr}) in the current window. > > > > > > > > The function returns 0 on success and -1 on error (window or tab page > > > > not > > > > found). > > > > > > Hmm, it's a bit strange to have this as a function. Otherwise setting > > > the argument list is done with commands. E.g. :argglobal is similar, > > > but always switches to the global argument list. > > > > > > We could use :{nr}arglocal instead. The question is where the user gets > > > the {nr} from. When using arglistid() this requires using :exe. I > > > think we need a command to list all the arglists. > > > > I agree. > > > > > > For a user who actually uses multiple arglists it would indeed be useful > > > to list the ones that are in use. With a summary of the file names, and > > > which window/tab they are used in. > > > > > > > Maybe it should show columns: > > file name, window id, tab id and arglist id > > > > or even omit tab id by default and only include other tab pages when > > a bang is used. I think it is better to organize the list by tab page id > > and window id rather by arglist id, since it will be easier to find the > > correct arglist id. > > > > Something like: > > tabdo windo echo printf('%2d %4d %4d %s', tabpagenr(), winnr(), > > arglistid(), bufname('%')) > > > > (but without the drawback of landing in a different window/tab page) > > > > Best regards, > > Marcin Szamotulski > > Dear Bram, > > I attach patch for :{N}arglocal (for using arglist with ID {N} in the > current window) command which also adds :arglists[!] (for listing all > the arglists). > > During compilation I get a warning: > ex_docmd.c:205:13: warning: ‘ex_arglists’ used but never defined [enabled by > default] > which I don't know how to fix.
Thanks. I'll give others some time to make comments. -- Contrary to popular belief, it's often your clothing that gets promoted, not you. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.