回答:
あなたができる:
:redir => scriptn | sil exe 'scriptnames' | redir end | echo(system('grep pattern',scriptn))
それがすること:
:redir => scriptn                    "redirect following output to variable scriptn
:sil exe 'scriptnames'               "silently execute scriptnames
:redir end                           "end the redirection
:echo(system('grep pattern',scriptn))  "echo the call of grep witht that input with the pattern `pattern`
:filterコマンドは、これに簡単な、1行のアプローチです。
:filter /indent/ scriptnames
コマンドの出力からのパターンに一致する行のみを表示します。indent:scriptnames
私は:redirこれらのような質問に対する指向的な解決策をよく見ます。これらはうまく機能し、多くのパワーとオプションを提供しますが、多くの場合、それらは少しやり過ぎだと感じます。何かがあるかどうかをすばやく確認する必要があるだけです。:filterシンプルで使いたい瞬間にとても便利です。
まず、出力を取得scriptnamesしてバッファに入れる必要があります。
あなたはそれのために使うことができます:redir:
:redir @a       " redirect output of following ex commands to register a
:scriptnames    " press G to get to the end of the output if it's too long
:redir END      " end the redirection
:vnew           " new buffer in vertical window
:put a          " put content of register
/pattern        " search for 'pattern'
と:scriptnameはいえ、自分の目でスキャンするには長すぎる出力は、より深い問題の症状である可能性があります。
NERDTree出力を:scriptnames短く保つために、すべての機能を単一のファイルに配置することを提案していますか?それはそれをよりよく書かれたプラグインにするでしょうか?