Hi,

On Thu, Apr 30, 2020 at 8:19 PM Wang Shidong <[email protected]>
wrote:

> *@wsdjeg* commented on this pull request.
> ------------------------------
>
> In runtime/doc/quickfix.txt
> <https://github.com/vim/vim/pull/5465#discussion_r418399236>:
>
> > +|setloclist()| function. This overrides the 'quickfixtextfunc' option 
> > setting.
> +
> +The example below displays the list of old files (|v:oldfiles|) in a quickfix
> +window. As there is no line, column number and error text information
> +associated with each entry, the 'quickfixtextfunc' function returns only the
> +filename.
> +Example: >
> +    " create a quickfix list from v:oldfiles
> +    call setqflist([], ' ', {'lines' : v:oldfiles, 'efm' : '%f',
> +                                     \ 'quickfixtextfunc' : 'QfOldFiles'})
> +    func QfOldFiles(info)
> +     " get information about the specific quickfix entry
> +     let e = getqflist({'id' : a:info.id, 'idx' : a:info.idx,
> +                                             \ 'items' : 1}).items[0]
> +     " return the simplified file name
> +     return fnamemodify(bufname(e.bufnr), ':p:.')
>
> why only return the file name instead of whole line?
>
>
>
The v:oldfiles variable contains only the name of the files. The above
example shows how to
populate the quickfix list from the v:oldfiles variable. So the function
returns only the name
of the file.

- Yegappan

-- 
-- 
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/CAAW7x7mZmMD6msbdif1enhm%2B-W7zwuuijr_f6vVeC_NkPUE3Ow%40mail.gmail.com.

Raspunde prin e-mail lui