is there a key-binding to open a selected/marked file from the from the file browser in Textmate? I.e., if I have files File1, File2, ... in Proj,
and I am currently editing File1, I can go the file browser on the right (in my case) with C-Tab and scroll down to FileN with the up/down-keys. How do I open it now?
Of course, you can always do something line ⌘-T and then type the name of the file, but if you have 100 files starting in the same way, it can be annoying. Thanks!
You open the files in the file browser the same way you open them in Finder, with ⌘-⬇︎.
When you select multiple files (⇧-⬇︎ / ⇧-⬆︎), you can open them all at once.
Related
I need to change the file extensios of a directoy. If I do it manually so it will take more time. So is there any windows shell command or batch file to do this?
Like all .html file in a folder will be .php?
make a .bat in a folder and put in it this code
#ren *.Old_extension *.New_Extension
Also if you want to change more extensions just copy the lane and paste it under edited like this
#ren *.Old_extension *.New_Extension
#ren *.Old_extension2 *.New_Extension2
Yes, You can easily do this Command Prompt
Suppose, You have a Folder so many .TXT files in your folder.
Open that folder and just press SHIFT + RIGHT click and select Open Command Windows here
After that type the following command to change all .txt file to .doc
ren *.txt *.doc
It will change all text files in doc file
That's all
When I try to do this, I get the following error:
Obviously, Windows Explorer doesn't allow me to create this type of file patterns. How can I overcome this problem?
In the File Explorer, the trick is to call your file .gitignore. and it will remove the ending .
A strange behavior but, hey!, it works 😅
Or create it from a text editor...
Windows Explorer doesn't allow you to create files that consist essentially of a file extension only. This is because Windows Explorer has the option to hide file extensions, leaving you with a file you cannot see (see Why doesn’t Explorer let you create a file whose name begins with a dot?). This is not a restriction of Windows itself, or the file system in use, though.
To create a file named .gitignore, you will have to use another tool to create it. A common solution is to create a text file (e.g. test.txt), open it in Notepad, and select Save As... to rename the file to .gitignore.
The Windows command interpreter also allows you to create files without imposing the additional restrictions of Windows Explorer. A more direct solution would then be to create the file from the command line. This can be done using the following command:
copy NUL .gitignore
Note: When dealing with files that don't have a name, it's helpful to disable the option "Hide extensions for known file types" in Windows Explorer. Otherwise Windows Explorer might show files with no names, or hide them altogether.
In cmd, just type
echo. 2>.name_you_want
or
. 2>.name_you_want
to create a file.
If creating a directory, just type
mkdir .folder_name_you_want
Use command line instead.
I was also having the same error. The problem was . at the start of file or folder name.
So I created it by command line.
You can do this with command prompt for folder creation:
mkdir .folder_name
I drag a lot of graphic files from Finder directly into InDesign and Photoshop. I use a vey simple bash script to quickly open the directory containing the file.
cd "/Volumes/Server/Resources/stock1/"
open .
The script opens the correct directory, but I would like to know how to get it to also go to a specified file (e.g., image.eps) and highlight/select it.
The directories I work with contain hundreds of files and have hard-to-look-through names. This would be a huge time-saver.
Thanks so much for any help. I'm using Mac OSX 10.9.5.
Use the -R (aka --reveal) option to select a single file:
open -R "/Volumes/Server/Resources/stock1/image.eps"
Something like,
open -R "/Volumes/Server/Resources/stock1/"*.eps
will not select all eps files in the folder, but instead will select each one successively, so that the end result is only the last file is selected.
#chepner's answer (-R option) is great if you want to highlight just one file. If you want to select multiple files, you may want to use Apple Script like this:
osascript -e 'tell application "Finder" to select files in folder "stock1" of folder "PHOTOS and IMAGES" of disk "Server" whose name ends with ".eps"'
I am having trouble opening a .txt file that is in a different set of folders than where I have my .rb test script. I have a file structure of different test categories and then one generic folder that holds data files like .txt and Excel files.
Example:
Test Scripts -> Data This is where the data files are saved
Test Scripts -> Home Page -> Checkout This is where the .rb test file is
I am using this to open the .txt file now:
File.open("Data/activeSites.txt")
when the .rb is in the same folder as the Data folder.
Any suggestions?
If I correctly understand what you're asking, the issue is that you want to move your Ruby script from TestScripts/ to TestScripts/HomePage/Checkout/ and aren't sure how to refer to the activeSites.txt file from there. Is that correct?
If so, you just need to know that ../ means "the parent directory", so you can use:
File.open("../../Data/activeSites.txt")
The first ../ refers to the Home Page folder, then the second takes you up one more level to the Test Scripts folder.
I want to make a .txt file inside the same folder that contains all the filenames of said folder.
How can i do that?
Thanks.
you can do this in terminal by using
ls {DIR} >> {FILE}
for example if i wanted to write a file called 'ls.txt' of all the files on the desktop i could use
ls /Users/corvinmcpherson/Desktop/ >> /Users/corvinmcpherson/Desktop/ls.txt
you can also create one using automator like this:
Or you can create an Automator Workflow like this as a Service, so that all you have to do is right click the folder, click the service and this text file will appear in the folder, with the name of the folder.