Permalink
Browse files

Add strip whitespace on save

  • Loading branch information...
1 parent de86e4f commit 7b43b395a51d1be8d2ad807b72608fcea005d78f @kneath committed Jul 12, 2010
Showing with 51 additions and 0 deletions.
  1. +51 −0 Strip Whitespace Then Save Document.tmMacro
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>bundleUUID</key>
+ <string>4D798994-A6A1-4F7E-B06B-439743EC92D5</string>
+ <key>commands</key>
+ <array>
+ <dict>
+ <key>argument</key>
+ <dict>
+ <key>beforeRunningCommand</key>
+ <string>nop</string>
+ <key>command</key>
+ <string>perl -pe 's/[\t ]+$//g'</string>
+ <key>fallbackInput</key>
+ <string>document</string>
+ <key>input</key>
+ <string>selection</string>
+ <key>name</key>
+ <string>Remove Trailing Spaces in Document / Selection</string>
+ <key>output</key>
+ <string>replaceSelectedText</string>
+ <key>uuid</key>
+ <string>0F8C1F78-6E4C-11D9-91AF-000D93589AF6</string>
+ </dict>
+ <key>command</key>
+ <string>executeCommandWithOptions:</string>
+ </dict>
+ <dict>
+ <key>argument</key>
+ <dict>
+ <key>beforeRunningCommand</key>
+ <string>saveActiveFile</string>
+ <key>input</key>
+ <string>none</string>
+ <key>output</key>
+ <string>discard</string>
+ </dict>
+ <key>command</key>
+ <string>executeCommandWithOptions:</string>
+ </dict>
+ </array>
+ <key>keyEquivalent</key>
+ <string>@s</string>
+ <key>name</key>
+ <string>Strip Whitespace Then Save Document</string>
+ <key>uuid</key>
+ <string>E0A9D091-F0B5-4ED1-AECF-6A47E409A270</string>
+</dict>
+</plist>

0 comments on commit 7b43b39

Please sign in to comment.