我试图做一个文件vimgrep为了得到只有两个attributs与他们的价值出xml文件。 到目前为止,我可以得到完整的线条,我希望在组的帮助下有更好的显示。与vimgrep - 或其他vim的可能性 - 我怎样才能得到一组文件中的数据?
:vimgrep key =%| copen
^我想添加到这个命令的分组可能性与“()”....但没有成功的时刻。
我会很感激你的帮助才能有结果作为“结果有望”文件
部分解释了我的工作:
<policy name="Menu_Controls" class="User" displayName="$(string.Menu_Controls)" explainText="$(string.IE_ExplainMenu_Controls)" presentation="$(presentation.Menu_Controls)" key="Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\AllowedControls">
<parentCategory ref="AdminApproved" />
<supportedOn ref="SUPPORTED_IE5" />
<elements>
<boolean id="MCSiMenu" valueName="{275E2FE0-7486-11D0-89D6-00A0C90C9B67}">
<trueValue>
<decimal value="0" />
</trueValue>
<falseValue>
<decimal value="1" />
</falseValue>
</boolean>
<boolean id="PopupMenu_Object" valueName="{7823A620-9DD9-11CF-A662-00AA00C066D2}">
<trueValue>
<decimal value="0" />
</trueValue>
<falseValue>
<decimal value="1" />
</falseValue>
</boolean>
<boolean id="Ikonic_Control" valueName="{F5131C24-E56D-11CF-B78A-444553540000}">
<trueValue>
<decimal value="0" />
</trueValue>
<falseValue>
<decimal value="1" />
</falseValue>
</boolean>
</elements>
</policy>
<policy name="Microsoft_Agent" class="User" displayName="$(string.Microsoft_Agent)" explainText="$(string.IE_Explain_Microsoft_Agent)" presentation="$(presentation.Microsoft_Agent)" key="Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\AllowedControls">
<parentCategory ref="AdminApproved" />
<supportedOn ref="SUPPORTED_IE5" />
<elements>
<boolean id="Microsoft_Agent_Control" valueName="{D45FD31B-5C6E-11D1-9EC1-00C04FD7081F}">
<trueValue>
<decimal value="0" />
</trueValue>
<falseValue>
<decimal value="1" />
</falseValue>
</boolean>
</elements>
</policy>
我的预期结果:
name="Menu_Controls" key="Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\AllowedControls"
name="Microsoft_Agent" key="Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\AllowedControls"
在此先感谢您的帮助。 toshi
你好,你的第一行强调了我所有文件中的策略。 请你能解释这第一行吗? 我的理解: V> - 视觉, /搜索<政策, 而是/ d什么? –
toshi
@ toshi哦,对不起,我的坏,这不是'v'视觉,我的意思是“命令:v”。所以它应该是':v /<......./ d' – Kent
非常感谢您的回复.....为什么我所有不想要的行仍在文件中;)无论如何,您的答案正是我在找什么,团队的替代品。 – toshi