Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Respect the user’s tab/spacing choices

git-svn-id: http://svn.textmate.org/trunk/Bundles/XML.tmbundle@8141 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
commit b125e305b04f178916cc2c532c2bdab7115b3fe9 1 parent 52cc5f1
@ciaran ciaran authored
Showing with 9 additions and 7 deletions.
  1. +9 −7 Commands/Tidy XML.plist
View
16 Commands/Tidy XML.plist
@@ -5,13 +5,15 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
- <string>result=`xmllint --format - 2&gt;&amp;1`
- if [[ $? &gt; 0 ]];
- then
- exit_show_tool_tip "Errors: $result"
- else
- echo "$result"
- fi</string>
+ <string>if [[ "$TM_SOFT_TABS" = "YES" ]];
+ then export XMLLINT_INDENT=`ruby -e"print(' ' * ${TM_TAB_SIZE})"`
+ else export XMLLINT_INDENT=$'\t'
+fi
+result=`xmllint --format - 2&gt;&amp;1`
+if [[ $? &gt; 0 ]];
+ then exit_show_tool_tip "Errors: $result"
+ else echo "$result"
+fi</string>
<key>input</key>
<string>selection</string>
<key>keyEquivalent</key>
Please sign in to comment.
Something went wrong with that request. Please try again.