Friday, May 22, 2020

Re: error list

On 2020-05-22, Joseph <kingcanute76@gmail.com> wrote:
> Is there an easy way to dump the error list to the current vim
> buffer/window?
>
> Actually, is there a general way to do this for other commands too?

I use this code, which you may adapt to your needs:

" Send the output of a Vim command to a new scratch buffer.
"
" Example: :call lf_run#vim_cmd('digraphs')
fun! lf_run#vim_cmd(cmd)
botright 10new
setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile nowrap
call append(0, split(execute(a:cmd), "\n"))
endf

" Execute a Vim command and send the output to a new scratch buffer
command! -complete=command -nargs=+ VimCmd call lf_run#vim_cmd(<q-args>)

So, try:

:VimCmd clist

Hope this helps,
Life.

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/ra998t%24377f%241%40ciao.gmane.io.

No comments:

Post a Comment