The other day, I was trying to bind the "remove trailing whitespace from all lines" to a keyboard shortcut that was evidently already bound to "delete whatever is selected with extreme prejudice". In doing so, I deleted the "remove trailing whitespace" item from the Text bundle.
How can I recover the item?
On 18 Apr 2014, at 8:40, Alexander Solla wrote:
[…] I deleted the "remove trailing whitespace" item from the Text bundle.
How can I recover the item?
To revert the (entire) Text bundle to its default state:
rm -rf "$HOME/Library/Application Support/Avian/Bundles/Text.tmbundle"
If you only want to restore the one item (and preserve potential other customizations done to this bundle) then delete `Commnands/Remove Trailing Spaces in Document : Selection.tmCommand` from the above path (it should be a delta property list with `isDeleted = true`).
[…] I deleted the "remove trailing whitespace" item from the Text bundle.
How can I recover the item?
To revert the (entire) Text bundle to its default state:
rm -rf "$HOME/Library/Application Support/Avian/Bundles/Text.tmbundle"
I gave that a try, but I still don't see the command in the Text bundle menu. I did some poking around and I don't see "Remove Trailing Spaces in Document" in $HOME/Library/Application Support/TextMate/Managed/Bundles/Text.tmbundle/Commands.
I even deleted the directory, deleted TextMate.app, and did a fresh install. I still don't see the command in the TextMate tree.
On 18 Apr 2014, at 10:03, Alexander Solla wrote:
[…] I did some poking around and I don't see "Remove Trailing Spaces in Document" in $HOME/Library/Application Support/TextMate/Managed/Bundles/Text.tmbundle/Commands.
Are you using TextMate 1.x or 2.0? The instructions I gave was for 2.0.
[…] I did some poking around and I don't see "Remove Trailing Spaces in Document" in $HOME/Library/Application Support/TextMate/Managed/Bundles/Text.tmbundle/Commands.
Are you using TextMate 1.x or 2.0? The instructions I gave was for 2.0.
TextMate version 2.0-alpha.9529
Right now, after the fresh install I tried (deleting $HOME/Library/Application Support/Avian, $HOME/Library/Application Support/TextMate, and the macromates preference files in my Library/Preferences):
$ ls $HOME/Library/Application\ Support/Avian
ls: /Users/ajs/Library/Application Support/Avian: No such file or directory
and also:
$ ls -1 $HOME/Library/Application\ Support/TextMate/Managed/Bundles/Text.tmbundle/Commands/
Convert Character : Selection to Char.tmCommand
Convert to ASCII.plist
Convert to hex.plist
Copy Matching Lines into New Document.tmCommand
Copy Non-Matching Lines into New Document.tmCommand
Decrypt selection.plist
Distill Document : Selection.tmCommand
Duplicate Line.plist
Encrypt selection.plist
Enumerate Lines.plist
Randomize Lines in Document : Selection.tmCommand
Reverse Sort.plist
Sort & Uniq.plist
Sort.plist
Speak Document : Selection.tmCommand
Strip non-printables.plist
*Strip trailing spaces.plist*
Word Count.plist
So I do see something that ought to be useful. How do I get it to show up in my bundle menu?
On 18 Apr 2014, at 10:48, Alexander Solla wrote:
Right now, after the fresh install I tried (deleting $HOME/Library/Application Support/Avian, $HOME/Library/Application Support/TextMate, and the macromates preference files in my Library/Preferences) […]
Try delete ~/Library/Caches/com.macromates.TextMate/BundlesIndex.binary and then relaunch TextMate.
Normally it should be unnecessary to delete anything else than the Strip Trailing… delta file (with isDeleted set to true), but if you have the fs-events issue (where fs-events does not work for some folders) then TextMate may not notice that you deleted this file, and so you’ll have to manually force a rebuild of the cache (by deleting above file and relaunch).