Open AlxHnr opened 2 years ago
I went looking for something similar, and turned up this issue. For future travelers, this worked well for my purposes:
command! -bang -nargs=? Apropos
\ call fzf#vim#grep('man --apropos '.fzf#shellescape(<q-args>), {
\ 'sink': {line -> execute('Man '. join(split(line, ' ')[:1],''))},
\ 'options': ['--preview', 'echo {1} | awk "{print \$1\$2}" | xargs man']
\ }, <bang>0)
which is roughly equivalent to the command:
man -k $WORD | fzf --preview='man {1}{2}' | awk '{print $1$2}' | xargs man
man fzf
)It would be great to provide a default command for searching available man-pages. This would complement commands like
:Helptags
and fits well into commands with external dependencies like:Locate
,:Rg
and:Commits
.