Another option is to use duti (https://github.com/moretension/duti).
Run brew install duti, save a filetype like this as:
duti -s com.sublimetext.3 public.plain-text all
The changes should be applied immediately, so you don't have to restart like when editing com.apple.LaunchServices.plist.
To also change the default application for executable scripts ...
To set Sublime Text as the default handler for public.plain-text:
Mavericks (10.9) and earlier
defaults write com.apple.LaunchServices \
LSHandlers -array-add \
Yosemite (10.10) and later
defaults write com....
I tried grg's solution in the past and I believe it worked. However, on Yosemite and El Capitan, I ran into problems.
DonnaLea's comment in that solution clued me in on creating a solution. I added the folder path before com.apple.launchservices additionally the file had a slightly different name com.apple.launchservices.secure.
You can see the file/...
Right click on a .txt file in Finder.
Choose "Get Info".
Expand "Open with:" and choose your preferred text editor in the
Push the "Change All..." button below the drop-down and then confirm
in the dialog that pops up with "Continue".
This works on Yosemite (OS X 10.10).
For plaintext tabs, you don't need to replace the entire TextEdit app to change it. I looked at the source code and it provides the simpler answer: Open the Terminal and type
defaults write com.apple.TextEdit "TabWidth" '4'
Where '4' is the number of spaces a tab should be.
The solutions proposed here work perfectly for Sublime, but I wanted to do this for Visual Studio Code. The only difference is that you have to find the "application bundle identifier" for whatever text editor you use. I ran this command:
/usr/libexec/PlistBuddy -c 'Print CFBundleIdentifier' /Applications/Visual\ Studio\ Code.app/Contents/Info.plist
Go to Edit → Substitutions and disable Smart Dashes.
You can disable this globally in System Preferences: Keyboard → Text. Disable ‘Use smart quotes and dashes’.
To only disable the dash substitution globally whilst leaving smart quotes enabled by adding the substitution to System Preferences: Keyboard → Text. Add a new entry set to -- for both ‘replace’ ...
Hey I just came across this question because today I just started to use Stickies as a To-Do list for things I need to finish over the day and I also wanted to have that feature that you strikethrough items or text you are done with…
I think an easy workaround for this is that you have lets say 3 items, then you go to mark your first item with the ...
This has stymied me for quite some time, and today I found the way to enable this for open documents. At the very top of the Document in BBEdit in the left hand corner, you will find the path of the file you are currently editing immediately preceded by a small gear icon. Click the gear icon and place a check in the box next to "Auto-expand Tabs".
Most people I know set the paste shortcut to invoke paste and match style. Here is the command to change:
You can paste with style when you really want it, but for me 95% of the time I don’t want the style and only the raw text.
Open System Preferences
Go to the Shortcuts tab
Select App Shortcuts
Select the + button
Type Paste and Match ...
Mou is my favourite Markdown editor for editing GitHub files and other documentation. Its live preview is priceless for editing in this way, especially using the specifically-designed GitHub theme that mimics the end result as shown on GitHub's preview and wiki pages.
The app also lets you export to HTML along with the CSS so that you can upload the ...
Free and Open Source (MIT License).
Table Tool opens CSV files. It auto-detects character encoding and record separator (comma/semicolon/tab), and supports basic editing operations (like add row, delete row, add column delete column etc).
Table Tool can convert files to a different format.
Table Tool is also available on the Mac App Store.
I use these two text editors and I think both are pretty good:
Sublime Text: Although it's not "free", it lets you use it for trial indefinitely. It just keeps asking you to buy it every 10-15 time you save a document.
Atom: Which is a text editor developed by GitHub and very similar to Sublime Text, except that it's free. Totally. Since it's new in ...
As shown in this answer on SuperUser, you can set this behaviour by changing the open_files_in_new_window setting in Sublime Text to false. (Note that it's recommended that you override the setting in the Settings - User file rather than changing it in Settings - Default.)
Disclaimer: Free on new Macs
Apple Numbers also opens and saves to CSV. Just had to add to the list.
Save as CSV after editing:
Note that you can choose text encoding as well when exporting if needed for other systems.
If you search for a comfortable way with more "linux feel"
add something like the following to your ~/.profile:
alias textmate='open -a TextMate'
alias textedit='open -a TextEdit'
depending on your editors.
Depending on the source of the file, you may wish to investigate its contents in other ways than just opening it (double clicking). For this, you should use the command line.
Some suggested starting points (where "whatever.xml" is the name of the file):
This will tell you what type the file is. Not by file extension, but by actual ...
DB Browser for SQLite
Not an obvious candidate but very powerful (and free).
Create an empty Database
Import Table form CSV file
With various import options
Edit, search, plot the data
Export your edits as (new) CSV file
The OS X version of this app that's been on Macs since System 7.5 has the ability to float, and become semitransparent.
Technically it's a rich-text notetaking app rather than a plaintext editor, but it might satisfy your use case.
Another option (quite the polar opposite of Stickies) would be to use an editor within Terminal, and use ...
I centralize all my default apps management with Magic Launch. You can configure it to open all txt with Sublime Text as default without command line (beside, you can change it easily from System Preferences).
One more exceptional useful Magic Launch’s feature is you can set rules based on filename, folders location, which I use intensively to choose ...
Any texteditor & textutil
Still intrigued by your problem I found the following solution. There is a Terminal app called textutil and it allows to convert richtext to plane text.
Edit and save your 'Rich' text anyway you want to (like in TextEdit).
Use the commandline textutil to convert your rich text to normal text
textutil richtext.rtf -convert txt
I don't think that's possible. OS's usually needs register how to handle each file first.
But it's not all lost: here is a situation that Automator can handle easily.
Here I'll show you, how to create a item menu in the right click context menu, that you can easily select to open your file, better than Open With option.
Create a new Service with ...
As I understand, you have a Python script in BBEdit.
You choose to test the code using the "Run in Terminal" option from the '#!' menu.
Now a Terminal window opens, runs the script and exits.
Now here is the culprit. BBEdit does not only run your script, but also adds an exit. There is no option in BBEdit to remove this exit command. But BBEdit is highly ...
Since you did ask "What other options for command-line text editors are built into macOS?" and ed was not mention in your OP, let me offer it as an addition to the list.
The manual page for ed states:
The ed utility is a line-oriented text editor. It is used to create, display, modify and otherwise manipulate text files.