On Sun, May 24, 2009 at 6:55 AM, Per Thulin wrote:
> Hi all!
>
> I'm a total newbie when it comes to vimscript, but I'm trying to write a
> little script that follow python import statements and locates the
> corresponding files. I want to add these files to the quickfix list so I can
> use :cc, :clist, etc to move between them. However, changing the quickfix
> list seems to have no effect. To demonstrate the problem:
>
> function! s:TestQF()
>     let qflist = getqflist()
>     call add(qflist, "test")
                       ^^^^^^
                       String

>     call setqflist(qflist)
                     ^^^^^^
              See :help setqflist()
"Each item in {list} is a dictionary."
"Non-dictionary items in {list} are ignored."

>     echo qflist
>     let qflist = getqflist()
>     echo qflist
> endfun
>
> Gives the output:
>
> ['test']
> []
>
> Anyone know what do do?

Adding 'test' doesn't give vim any of the information it needs about line
numbers or file names.  So, since it can't do anything useful with what you
gave it, it throws it away.

~Matt

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to