How do I create a .conf file in Mac osx Lion? - macos

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.

Related

How to change a file's extension to something else?

I downloaded an .R file from a zoom chat on desktop to open in Rstudio later.
Well, the .R extension was not part of the name, so I changed the name to something.pdf (of course by mistake).
The icon now looks like a pdf. I replaced the .pdf with .R. But the icon still is a PDF file and Rstudio does not recognize it as an R file.
How can I can change it back to its .R format?
edit. thanks for pointing this out. I am on a windows 10 machine. and the file is on desktop.
Troubleshoot for Windows
You may be trying to add multiple file extensions, which does not allow the file to be ready correctly.
A quick google search.
How do I reveal file extensions?
For Windows 8-10
Start Windows Explorer, you can do this by opening up any folder.
Click the View menu.
Check the box next to "File name Extensions"
Then make sure you have my_file.R as opposed to my_file.R.R.pdf.

Why doesn't .gitignore.txt file show it's name in windows10?

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?

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.

Force Firefox not to change file extension?

Is it possible to force Firefox not to change the file extension of a file the user downloads? Currently I have the problem that I have a .reg file to download, but Firefox, even though in the Download dialog it says "Text file (*.reg)", saves it as a .reg.txt file, which is highly annoying. How to fix this?
You could try to do the following things:
1.) https://support.mozilla.org/en-US/kb/change-firefox-behavior-when-open-file
Maybe extension (in your case .reg) is associated with Notepad and you could changed it in Options/Applications
a) Click the menu button and choose Options.
b) Select the Applications panel.
c) The Applications panel will display. Select the type of file for which you want to change the default action.
2.) https://bugzilla.mozilla.org/show_bug.cgi?id=511624
This is an old bug, but if you use the affected version of firefox...
When you right click on a link to a batch file and click save as, it will allow you to save it, but it automatically adds .txt to the end of the filename without informing you.
You are unable to save it as .bat
Reproducible: Always
Steps to Reproduce:
1.Right click on a batch file link
2.Click save as
3.Save it
Actual Results:
filename is file.bat.txt
Seems to be a Firefox on Windows bug. My coworker was implementing download of .reg files and I use Firefox, I tested for him and got a .reg.txt. Just renaming it after download was sufficient to make the .reg work, but I got curious if that would happen on Linux also.
Grabbed my laptop where I have Ubuntu installed and the file was downloaded with the correct extension (just didn't run because .reg is a windows extension, it did open in the text editor). It was not automatically renamed as a .txt.

Sublime Text 2 / Sublime Text 3 bring back unsaved files on osx

In sublime I know even if you don't save the changes in a file later one you can start from where you left off. I opened a new tab in sublime and closed the application before I save my file. Does sublime save a temp file somewhere in the computer (I am using MAC OSx)
Sublime Text 2 stores the files in ~/Library/Application Support/Sublime Text 2/Settings, in the .sublime_session files that are located there.
The contents of those files are a large JSON blob that contains the individual tab contents. Search in the file for the file name / tab name / a key word in the document and you should be able to get what you need.
For Sublime Text 3, use the following path:
~/Library/Application Support/Sublime Text 3/Local/Session.sublime_session
Credit to: eebbesen
I know it's a late answer but here's where I found it.
Linux: ~/.config/sublime-text-3/Local/Session.sublime_session
Windows: %USERPROFILE%\AppData\Roaming\Sublime Text 2\Settings\Session.sublime_session
Hope this helps someone someday.
As far as I know, Sublime Text keeps open files when you quit the application. However, if you close the tabs or project window without saving, the changes are lost.
In the former case, the files are saved in Local/Session.sublime-session (I'm using ST3 though, could be different in ST2!) You can open ST's packages folder from the command palette using "Browse Packages".
For Sublime Text 3,
Windows: %USERPROFILE%\AppData\Roaming\Sublime Text 3\Local\Session.sublime_session
For Sublime Text 3 / For Sublime Text 4
If you used portable version(.zip) version then refer to
sublime_installation_folder\Data\Local\Session.sublime_session
PS: Make a backup, before replacing the file, in case, you want to revert
This gives you your unsaved files and opened files as per your recent view.

Resources