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.
Related
There are multiple discussions on how to programmatically edit a file name in the file inspector. However, if I simply want to manually change the name of this file in the file navigator.
I have tried clicking on it, then waiting, then clicking again. That seems to work sometimes, but with this xib file I can't seem to get it to work.
This seems to happen intermittently, so I can't provide repeatable steps. I'm looking for an alternative to clicking, waiting, then clicking again guaranteed way to rename a file in the Toolbar/File Navigator.
Like in Finder.app:
Select the file, tap Enter.
Or using the File Inspector (right panel):
Select the file, View/Inspector/File, change the name there.
Like here
How can I open the containing folder of an open file in Sublime Text 3 in OSX? Prefer an answer that shows me where the menu option is, rather than setting up a command-line.
Some other posts I've searched suggest right-clicking the file and selecting the Open Containing Folder option, but I don't see it on mine...
What you read is correct, but you may be falling afoul of the fact that the context menu that you get when you right click on the file tab is different than the one that you get if you right click in the file itself and, counter-intuitively, the option for opening the containing folder (or copying the path of the file to the clipboard) only appears in the file context menu.
The option you want is Reveal in Finder, which is near the bottom of the menu (note that my menu may be slightly different than yours depending on installed packages):
Recently I scaffolded a project with webapp generator. It created two files .gitignore and .gitattributes. Both show a file extention of type Text Document But when I press F12 to edit any one's name then it has empty name. Here is the snapshot:
My question is why don't window show the name as .gitignore?
There is nothing special with those files. This visual guide may help you.
Also in Windows 10 you may simply try this option in View Tab of Folder Explorer:
After looking and reading closer, it seems that the "problem" is that with the default settings of Explorer "known" file-name extensions (like e.g. .txt) are just not shown.
So if you name a file .txt (full file-name) then it will show up as empty and with no name.
Dot-files are not having any "extension" to their file-name. The full file-name of e.g. the Git ignore file is .gitignore.
It comes from the Unix world where file-names doesn't have to follow the DOS and Windows name.ext scheme, and means that the file is hidden.
Windows since long allows arbitrary file-names as well, but in a name.ext scheme such files doesn't have a "name" only an extension.
Windows interprets .gitignore as an empty file name with the extension "gitignore", and thus shows an empty name be default. To properly see its name, open the folder's properties and check the "Show All File Extensions" option.
I don't have an answer, but I have a preference. I'd prefer not to show all extensions just to be able to see my .gitignore files in Windows10 file explorer.
I'm hoping to extend OP's question by showing I DO SEE .babelrc and .eslintrc, and w/o seeing all file extension setting being set to "on".
It seems, on my own system, that the associations for BABELRC and ESLINT(RC|IGNORE) are, maybe, set automatically by VSCode? In any case, why can I see those "." files, while the in.json is showing with hidden extension, but I can't see .gitignore?
I'm using plain text format on text edit and I'm also storing the file as filename.conf but it always ends up getting stored as filename.conf.txt. I've even unchecked the box that says "If no extension is provided, use .txt"
TextEdit just doesn't seem to recognize .conf as an extension?
Any help with this?
Open TextEdit's Preferences, and switch to the Open and Save section. Under the When Saving a File panel, uncheck the Add '.txt' extension to plain text files option.
I am working on xcode4 and created a Settings.bundle for my project. I can edit the Root.plist file in xcode4 but it is not possible to edit the Root.strings file. It isn't even displayed in the editor.
I can not expand the en.lproj folder as you see in the picture.
But when I do right-click, open in external editor it gives me:
Double click on Root.strings gives me:
I tried it several times, creating a new window-based application project and creating a new Settings.bundle. I always can not localize it. Any ideas?
In XCode 4.2 you have to follow this steps (just a modification of Xcode 3.2.2 and localization of Settings.bundle)
Reveal your Settings.bundle in Finder.
Right click (or Ctrl-click) on it and select Show Package contents.
Create a new folder called as the desired language (e.g., fr.lproj).
Copy the Root.strings file from the en.lproj folder and paste in fr.lproj folder.
EDIT: Apple fixed, once again, the wrong bug. Their change rendered my workaround useless. It just doesn't work anymore, you can't add files to the Settings.bundle.
Please refer to the answer of Javi for a method that seems to work.
I hope you like ugly workarounds.
Right click on the settings bundle in the side bar.
Select New File
Pick Resource / Strings file
Name it Root.strings, make sure it is placed inside settings.bundle
In the side bar the file will be visible twice. In the "root" section, and in the Settings.bundle. But both point to the same files.
Select the Root.strings file in the root section. (AFAIR you have to convert it to UTF16)
Add localization, xcode will ask you if you want to replace the file. Yes, you want this.
Add as much localizations as you want. You should be able to edit the file in the root section of the sidebar.
I hope this works for you, for me it does.
And if you haven't done it please report the bug at bugreport.apple.com
I'll install the new release now, let's see if this is fixed. Edit: Not fixed.
EDIT: I don't know If I understood your second question correctly. But when you add a localization to the file that appears outside of the bundle it adds a localization folder to the settings.bundle
After adding spanish localization to Root.strings:
The actual file is in the foo.lproj folder, it just doesn't show them in the xcode sidebar. If you check the location in the file system you'll see they are inside the settings bundle.
Yesterday I checked with a english and german file and it worked correctly in the simulator. I guess it's just a wrong sidebar layout. The underlying locations and the handling of the files seems correct.
For me it worked to change the File Type (in the File Inspector) of the Folder "en.lproj" from "Default / Directory" to "Directory". Magic.
Xcode 4 is creating the "Root.strings" as a binary property list. so what I had to do was set the file type to "Property List (binary)" for it to show up correctly.
I have just given up trying to do something with Root.strings. Instead, I just copied the plist into each *.lproj, and it worked!
As far as this is about translation into English and my native language, no problem.
So I have:
Settings.bundle
|- en.lproj
| |- Root.plist
| `- Root.strings -- nothing useful there
|
`- zz.proj
`- Root.plist
The good news is that Root.plist is utf8.
If you already have a Root.strings file that is a "Property List (binary)" and you wish to convert it to a proper text-based strings file, you can use plutil in the Terminal application to convert it, for instance into JSON format:
> plutil -convert json /path/to/Settings.bundle/en.lproj/Root.strings
N.B. You can run plutil -h for usage help.
However, you will then need to convert the JSON format:
{"key1":"value1","key2":"value2"}
to that of a strings file:
"key1" = "value1";
"key2" = "value2";
This is easily done with a few search/replace operations in a text editor.