Skip to content
Browse files

Merge pull request #16 from libo/master

Add a newline at end of file if needed (sed -a '$a\')
  • Loading branch information...
2 parents 11d5889 + 6bf6bb1 commit 916c21f24fdc037577d6ee92ab124de1b8cd115e @glennr committed Aug 15, 2012
Showing with 3 additions and 2 deletions.
  1. +2 −2 Macros/Convert Tabs to Spaces, Strip whitespace, save.tmMacro
  2. +1 −0 README.md
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)

0 comments on commit 916c21f

Please sign in to comment.
Something went wrong with that request. Please try again.