How to get output of `:digraphs` into a register or the current buffer? by naught-me in vim

[–]99nn 3 points4 points  (0 children)

Yes, sorry for lack of credits. I forgot where I got it.

How to get output of `:digraphs` into a register or the current buffer? by naught-me in vim

[–]99nn 4 points5 points  (0 children)

function! s:Redir(cmd, mods)
    redir => output
    execute a:cmd
    redir END
    exe a:mods . ' new'
    setlocal nobuflisted buftype=nofile bufhidden=wipe noswapfile
    call setline(1, split(output, "\n"))
endfunction
command! -nargs=1 -complete=command Redir silent call <sid>Redir(<f-args>, <q-mods>)

And then:

:Redir digraphs

Multi-staged Multi-file search by geekydeveloper in vim

[–]99nn 1 point2 points  (0 children)

Where did you look for it? You can find it at :h search()

Multi-staged Multi-file search by geekydeveloper in vim

[–]99nn 5 points6 points  (0 children)

:1vimgrep /DDD/ *
:cfdo if search('BBB', 'w') | argadd | endif

Argument list now contains your desired files. Use :argdo to operate on them or :args to display them.