How can I prevent automatic carriage returns (line wrapping) after copy/pasting web.config XML nodes?
How can one prevent automatic carriage ret开发者_运维百科urns for copy/pasted web.config XML nodes?
Notice how each attribute is on a new line in the pasted snippet of code (from the web.config file)
Copy this:
<navigationGraph iViewManager="WebFormViewManager" name="PrintCOCs" state="State" statePersist="SqlServerPersistState" startView="1PrintCOC Set Preferences" endView="3PrintCOC Finished" cacheExpirationMode="Absolute" cacheExpirationInterval="12:00:00">
<node view="1PrintCOC Set Preferences">
<navigateTo navigateValue="Cancel" view="Supplies Dashboard" />
<navigateTo navigateValue="PrintCOCs" view="2PrintCOC Print Chain of Custodies" />
</node>
<node view="2PrintCOC Print Chain of Custodies">
<navigateTo navigateValue="Back" view="1PrintCOC Set Preferences" />
<navigateTo navigateValue="Finished" view="3PrintCOC Finished" />
</node>
<node view="3PrintCOC Finished">
<navigateTo navigateValue="Finished" view="Supplies Dashboard" />
</node>
</navigationGraph>
And this is what it looks like after being pasted:
<navigationGraph iViewManager="WebFormViewManager"
name="PrintCOCs"
state="State"
statePersist="SqlServerPersistState"
startView="1PrintCOC Set Preferences"
endView="3PrintCOC Finished"
cacheExpirationMode="Absolute"
cacheExpirationInterval="12:00:00">
<node view="1PrintCOC Set Preferences">
<navigateTo navigateValue="Cancel"
view="Supplies Dashboard" />
<navigateTo navigateValue="PrintCOCs"
view="2PrintCOC Print Chain of Custodies" />
</node>
<node view="2PrintCOC Print Chain of Custodies">
<navigateTo navigateValue="Back"
view="1PrintCOC Set Preferences" />
<navigateTo navigateValue="Finished"
view="3PrintCOC Finished" />
</node>
<node view="3PrintCOC Finished">
<navigateTo navigateValue="Finished"
view="Supplies Dashboard" />
</node>
</navigationGraph>
In Visual Studio 2008, this is under Tools => Options => Text Editor => XML => Formatting => Attributes. But it looks like your original XML is too wide for its own good. :)
精彩评论