Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a newline at end of file if needed (sed -a '$a\')

  • Loading branch information...
commit 6bf6bb1512a38bd901d5d26b5eabc358d9e9b8b7 1 parent 11d5889
@libo libo authored
View
4 Macros/Convert Tabs to Spaces, Strip whitespace, save.tmMacro
@@ -14,13 +14,13 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
- <string>perl -pe 's/[\t ]+$//g'</string>
+ <string>perl -pe 's/[\t ]+$//g' | sed -a '$a\'</string>
<key>fallbackInput</key>
<string>document</string>
<key>input</key>
<string>selection</string>
<key>name</key>
- <string>Remove Trailing Spaces in Document / Selection</string>
+ <string>Remove Trailing Spaces in Document / Selection. Add a newline at end of file</string>
<key>output</key>
<string>replaceSelectedText</string>
<key>uuid</key>
View
1  README.md
@@ -4,6 +4,7 @@ This macro automatically removes your "diff cruft" with;
Convert Tabs To Spaces, And
Remove Trailing Whitespace
+ Add a newline at end of file
when you use the Save Cmd (⌘S)
Please sign in to comment.
Something went wrong with that request. Please try again.