Textmate cmd + t search. How to include directories - textmate

I've always worked on small enough apps where I did not need to include a directory for Textmate cmd + T searching. Now I'm working on a huge app; swear to god it has 100 route files. Have no idea why.
So now if I to a search for routes.rb, I get 100 results. What I want is to include the directory config so I don't get so many results.
How can I include directors in Textmate cmd + T searches such as config/routes.rb?

Maybe you will like the GoToFile bundle. It's like Command-T but the search string is matched on the directory name and file name, not just on the file name part.

I think 'Go To File' may work for you:
https://github.com/amiel/gotofile.tmbundle/
If you download it via GitHub, be sure to rename it to remove the hash at end of the extracted folder, so it's something like: 'amiel-gotofile.tmbundle' which you can just double click to install.

If you drag a folder from the Finder onto TextMate's icon in the dock, it will open that folder up as a project. You can then search the files within it using Edit>Find>Find in Project (Shift-Cmd-F).

Related

How can I add a new folder in Sublime Text?

I'm in Sublime working on a project that I need to add a folder in; when I right click to try "Add Folder.." I type in name, press enter and nothing happens. It will still allow me to add a file no problem, but that's not what I need just yet.
You can add files and folders on the sidebar in Sublime Text. First, go to Project -> Add Folder to Project and select whatever your parent folder is. That'll put your parent folder in the sidebar. Then you can right click on any of the folders in the sidebar to create child files and folders.
I was having the same problems, not being able to create folders in the sidebar. Luckily, this method worked for me:
I typed in the name field the full path of one random file:
foldername-1/foldername/filename.php
The folders got created automatically.
I thought I had the same issue, but I've realised that when you click on create New Folder, appears a bar at the bottom asking you for the Folder Name. Once you give it a name, the folder will be added.
I may have the same problem with you.
When I press Enter, it actually gives me a newline.
I can't apply the rename/add folder action through sidebar.
This github issue may be related.

How do I use Mac OS aliases in Sublime Text 3?

I want to open the tree of folders which contains any code on my Mac in Sublime 3. Something like this:
But I don't have all of it in one folder, and it isn't convenient enough to open many folders in Sublime every time I close the app. So I have created 'aliases' (via Finder) to my folders and put them to one (folder), which i want to open with Sublime.
That didn't work out. Sublime opens these aliases as hex code. While ordinary folders open well.
So the main question: is there a way to make this work as I thought via preferences, or any plugin?
Use symbolic links instead by opening Terminal and using ln -s <SOURCE> <ALIAS>.
You can keep any number of folders you want collected in one place by using projects. Simply drag the folders you want, in the order you want, into the sidebar. Then, select Project -> Save Project As... and save the file anywhere you want with the .sublime-project extension. While you're at it, make sure you have
"hot_exit": true
in your user settings, as this enables you to close windows which have a project assigned to them, and all open files and unsaved changes are automatically preserved. When you next open the project, everything will be the same.

Take multiple .zip files and extract them to external location

This is something that I thought would be extremely simple to do. A math teacher handles her notes through Dropbox and gets .zip files emailed to her containing updates (by updates- they're the full folders so she can delete the old and extract the new ones in their places). She asked if it was possible to extract the zip files, then copy them to the dropbox. Coming from a Linux/Mac point of view I thought it would be easy- unzip command with -d... Little did I know Windows doesn't support unzip. I've tried googling ways to do this, and found that windows doesn't seem to have a default 'unzip' command of any kind? And when trying to copy the files, wildcards don't work either??? She gets 7+ .zip files at a time, all are named "Unit (number).zip" So I was using Unit*.zip. Any help/ideas would be appreciated- I already suggested she tries ubuntu because she constantly states how she likes the way my laptop looks.
WinZip can quickly unzip multiple files through its drag and drop interface. You can select multiple WinZip files, right click, and drag them to a folder to unzip them all with one operation.
From an open folder window, highlight the WinZip files you want to Extract
Right click in the highlighted area and drag to the destination folder
Release the right mouse button
Choose WinZip Extract to here
To unzip multiple Zip files without drag and drop:
From an open folder window, highlight the WinZip files you want to Extract
Right click in the highlighted area
Choose WinZip Extract to ...
Enter the destination folder
Source http://kb.winzip.com/kb/entry/77/
You can easily use the GUI for this:
Here is a trick I have found for extracting multiple zips at once without installing any extra programs:
Select the zip files that you want to extract
Right-drag them to an empty space (in the same folder is fine)
Select Extract and follow the prompts
Yes, it is not quite as nice as using the command prompt, but it does get the job done.
Also, wildcards do work with command prompt. Perhaps you weren't issuing the command correctly. This command works fine for me:
copy Unit*.zip D:\folder2\

Search in all files in a project in Sublime Text 3

Is there a way to search for a string in all files inside a project in Sublime Text 3? The string is not a method.
You can search a directory using Find → Find in files. This also includes all opened tabs.
The keyboard shortcut is Ctrl⇧+F on non-Mac (regular) keyboards,
and ⌘⇧+F on a Mac.
You'll be presented with three boxes: Find, Where and Replace. It's a regular Find/Find-replace search where Where specifies a file or directory to search. I for example often use a file name or . for searching the current directory. There are also a few special constructs that can be used within the Where field:
<project>,<current file>,<open files>,<open folders>,-*.doc,*.txt
Note that these are not placeholders, you type these verbatim.
Most of them are self-explanatory (e.g. -*.doc excludes files with a .doc extension).
Pressing the ... to the right will present you with all available options.
After searching you'll be presented with a Find results page with all of your matching results. To jump to specific lines and files from it you simply double-click on a line.
You can put <project> in "Where:" box to search from the current Sublime project from the Find in Files menu.
This is more useful than searching from the root folder for when your project is including or excluding particular folders or file extensions.
Solution:
Use the Search all shortcut: Ctrl+Shift+F, then select the folder in the "Where:" box below. (And for Mac, it's ⌘+Shift+F).
If the root directory for the project is proj, with subdirectories src and aux and you want to search in all subfolders, use the proj folder. To restrict the search to only the src folder, use proj/src in the "Where: " box.
Right click on your root folder, find in folder.
Here's the easiest way : File -> Find in files

XCode blue folders aren't being treated as subdirectories?

Okay, I had asked a question earlier about how I could create my own directories within XCode so as to be able to search for specific files more efficiently. I re-imported my files, this time making sure to create folder references instead of flat groups. Everything looks good, and my files are neatly organized in blue folders.
Now I had thought this would mean the paths to the files within these folders would change, and I could search through the new, more specific paths (instead of having to search through the contents of the entire application bundle every time). But the path for every file in any folder is still identical to what it was earlier.
For example: a text file called "items.txt" is located within the "SupportingFiles" folder that I imported as a reference. I would expect the path to include "/SupportingFiles/items.txt". But the path is logged as /Users/Mike/Library/Application Support/iPhone Simulator/5.1/Applications/(lots of numbers and text)/Adventurer BASE.app/items.txt.
Or "xxDefault.txt", which is included in the "Defaults" folder, which itself is in the "SupportingFiles" folder. I would expect to see "SupportingFiles/Defaults/xxDefault.txt" or something like it. But again, the logged path ends in "Adventurer BASE.app/xxDefault.txt"
Every single file in any location has a path ending in "Adventurer BASE.app/(file name)". Doesn't matter if it's on the simulator or an actual device. I thought importing the resources within folder references (blue folders) was supposed to do the trick, but evidently there's something else to be done.
Clearly I am misundertanding XCode's filing system. Any help figuring it out would be awesome, as I'm about to rip my hair out.
Sounds like a caching issue, my first idea would be to delete the build directory by holding down the alt key, access the Product menu and select Clean Build Folder... in Xcode.
After checking #InsertWittyName's suggestion (which is fairly likely correct), make sure that in your Copy Files step you're copying the folder reference and not the individual files.
The blue folder in Xcode is within the main bundle. It is not in the "Application Support" (NSApplicationSupportDirectory) tree. The path to the blue Xcode folder is:
NSString *sourcePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:#"SupportingFiles"];

Resources