What kind of a file is a "textfile" with no extension? - text-files

What kind of file is a "textfile" with no extension? - A file with text inside it, but no .txt at the end.
I don't understand the purpose of a file like this, but I've seen them in Github repos, commonly storing a list of words with a word on each line.
Its also possible to create one of your desktop if you create a .txt file and then delete the .txt part. On a Mac it says that its still a Plain Text Document if you click "get info".
So is this still exactly the same as a textfile?

Related

Rubymine can't recognize ruby file

The file attendance_statistics_controller.rb can't be recognized as a ruby file. All other files can and when i change the name to anything else this one can aswell. It has nothing to do with the length of the filename.
The image on top shows how the ruby file is recognized as a textfile. Changing the name does the trick as shown on the one on the bottom.
Is it a bug in the application or is there something to do about it?
The file name has been registered as being a .txt file
To fix this:
Go to Rubymine | Preferences | Editor | filetypes.
Find the Text file type in the list of recognized filetypes and click it.
Then browse the registered patterns in the box just below and find the file name.
Click it and remove it with the minus(-) button.
Apply changes.
Judging from the file type icon in your screenshot, I guess you have accidentally enabled the Mark as Plain Text feature upon the file. Marking the file as plain text is accessible from the file's context menu and normally it can be used to prevent Rubymine from navigating and completing the code inside the file.
Right click the file and choose the "Mark as Ruby" item to make Rubymine recognize it as ruby code again.

Can I mass replace hundreds of references to files in Xcode 6?

I have an iPad app and I've recently replaced hundreds of PNG's with JPG's to reduce the project size. Now Xcode is rightfully complaining that there are 1000's of missing file references. I can easily select the file, edit its properties and change .png with .jpg and All is Fine. However I will be an old man when I'm done.
Is there a way to mass replace all missing references in the project? Or can I mass remove all missing file references so I can re-add them?
Yes, edit your project file manually, using BBEdit or some other text editor with a search and replace feature.
Right click on the whatever.xcodeproj file (which is really a folder), and select Show Package Contents, in there, you'll see a project.pbxproj file. Edit this file in your editor, and do a search and replace for png to jpg or whatever. You can get fancy with your search and use a regex to select specific paths if you like, rather than doing every png file. That only matters if you still have some png's in the project.

Associating File Extensions to a files with variable extensions

In Windows, I have a set of files in a folder that all have similarly formatted text content, but with different extensions based on a timestamp. For example, assume two files named data.20140424 and data.20140423 for two days. Each day brings a new file with a new extension.
Is there a way to associate all the extensions with a single program that can view the files? Do I need to have a registry entry for each extension? Is there an alternative way to associate files besides extension, like with mime type or full filename?
You need a registry entry for each file. If you're on windows, double-click the file, select the program to open it with. Make sure "use this program every time" checkbox or similar checkbox is checked. It will open and you won't need to do this again.

Where to put .tmLanguage in sublime text 3?

I'm having trouble with Ruby syntax highlighting in combination with RegExp.
Someone suggested that I update my Ruby.tmLanguage file with some additional code.
Problem is, I can't locate this file on my computer. Inside sublime_text_3/Packages I only see .sublime-package files, which I can't properly open with sublime text; it only shows numbers.
Do I have to create this file myself, and if so, where?
Or does this work differently in sublime text 3 (as opposed to 2, which was probably the latest version when this solution got posted).
reference to additional Ruby.tmLanguage code: https://gist.github.com/elgalu/3921521
Those .sublime-package files are actually zip files in disguise. The default Ruby.tmLanguage file can be extracted from Ruby.sublime-package. Open it with some sort of archive manager. Copy and rename the extension to .zip if you have to.
Once you've made the changes in Ruby.tmLanguage, the modified file goes somewhere in your packages folder (I can't remember exactly where), which you can open from ST by going to Preferences > Browse Packages.

Textmate - how do I create a new empty file in the same folder as the current file?

With the Textmate "filesystem explorer tray" open I would like to create an empty file in the same folder as the currently open file. I cannot see a simple way of doing this barring creating a new file and then hunting through the file system in the save dialog.
Is there an easier way?
With the first document open in TextMate, type the following anywhere in that document (although a blank line works best):
mate "$TM_DIRECTORY"/mynewfile.txt
or even
mate "$(dirname "$TM_FILEPATH")"/mynewfile.txt
Then, highlight the text and hit Control-r. If it's on its own line, you don't even need to highlight it. Just be on the same line... Of course, you don't need to type that all the time. This is what we have snippets, commands and macros for!

Resources