
vimを使用して変数を表示できますが、:let g:
その中で検索することはできません(キーバインディングは非常に制限的なようです)。vim
このコンテンツを内部バッファで開くか、他のコマンドに渡すことはできますか?
答え1
あなたができることは、:redir
ファイルに書き込んで編集することです:
:redir > variables.vim
:let g:
:redir END
:n variables.vim
または、variables.vim
他のコマンドへの入力として使用されます。
答え2
Vim 8.1.0495(2018年10月25日)
vimパッチ8.1.0495では、この:filter
コマンドがサポートされます。:let
:filter <pattern> let g:
:filt :filter
:filt[er][!] {pat} {command}
:filt[er][!] /{pat}/ {command}
Restrict the output of {command} to lines matching
with {pat}. For example, to list only xml files:
:filter /\.xml$/ oldfiles
If the [!] is given, restrict the output of {command}
to lines that do NOT match {pat}.
{pat} is a Vim search pattern. Instead of enclosing
it in / any non-ID character (see 'isident') can be
used, so long as it does not appear in {pat}. Without
the enclosing character the pattern cannot include the
bar character.
The pattern is matched against the relevant part of
the output, not necessarily the whole line. Only some
commands support filtering, try it out to check if it
works. Some of the commands that support filtering:
:# - filter whole line
:clist - filter by file name or module name
:command - filter by command name
:files - filter by file name
:highlight - filter by highlight group
:jumps - filter by file name
:let - filter by variable name
:list - filter whole line
:llist - filter by file name or module name
:marks - filter by text in the current file,
or file name for other files
:oldfiles - filter by file name
:set - filter by variable name
Only normal messages are filtered, error messages are
not.