Sample Header Ad - 728x90

Ask Different (Apple)

Q&A for power users of Apple hardware and software

Latest Questions

6 votes
3 answers
1365 views
File with no extension will be opened by TextEdit by default. How do I change that?
File with no extension will be opened by TextEdit by default. For example, in terminal run `open ~/.ssh/known_hosts` will open TextEdit to edit `known_hosts` These files are normally just text file so I don't want to use TextEdit open them (e.g. I want to use BBEdit to open them) but because they ha...
File with no extension will be opened by TextEdit by default. For example, in terminal run open ~/.ssh/known_hosts will open TextEdit to edit known_hosts These files are normally just text file so I don't want to use TextEdit open them (e.g. I want to use BBEdit to open them) but because they have no extension I can't find an each way to change the default app to open them in one shot. Change them one by one is not workable. So is there any way to change them in one shot? https://apple.stackexchange.com/questions/123833/replace-text-edit-as-the-default-text-editor does not work for me, First, the highest two answers there said something like duti -s com.sublimetext.4 public.plain-text all but as @Seamus said in his updated answer "The accepted answer may have been correct when it was written, but does not work for current (as of approximately Catalina vintage) systems because the UTI for a text file without a file extension is now apparently public.data". Besides I don't know how edit bbedit part, is it com.bbedit.13 (I use bbedit 13 or what else)? Second, all the other 3rd-party apps are too old, at least 10 years old without any update.
Qiulang 邱朗 (879 rep)
Apr 26, 2023, 10:00 AM • Last activity: Apr 22, 2025, 03:00 PM
1 votes
0 answers
87 views
How to make BBEdit use Homebrew shellcheck?
On my Air I have `shellcheck` installed via Homebrew (`/opt/homebrew/bin/shellcheck`) and my BBEdit installation is aware of it - when editing a file detected as "Unix Shell Script" the **#! -> Check Syntax** menu option is enabled. On my new Mini, I also have `shellcheck` installed but BBEdit never...
On my Air I have shellcheck installed via Homebrew (/opt/homebrew/bin/shellcheck) and my BBEdit installation is aware of it - when editing a file detected as "Unix Shell Script" the **#! -> Check Syntax** menu option is enabled. On my new Mini, I also have shellcheck installed but BBEdit never enables the menu. I've checked various things on the Air: - Command history for any defaults write ❌ - Symlinks to make shellcheck available via another path ❌ - Settings within BBEdit ❌ - BBEdits Expert Preferences documentation ❌ On the Mini, I have quit and restarted BBEdit and rebooted the machine, to no effect. What am I missing to enable BBEdit to see/use shellcheck? ## Update Following a suggestion from Barebones support, I have run the command below via BBEdit's "Text ➝ Run Unix Command" menu item: printenv; which -a shellcheck That reveals that BBEdit is seeing a $PATH which includes /opt/homebrew/bin and that it *can* see shellcheck as /opt/homebrew/bin/shellcheck Sadly the "Check syntax" menu item is still not being enabled.
Chris (276 rep)
Jan 10, 2024, 08:53 AM • Last activity: Jan 12, 2024, 06:09 PM
0 votes
0 answers
123 views
BBEdit - how to move sidebar from left to right side of screen
I'm currently using BBedit 14 and I can't find any option to move the sidebar from the left side of the screen to the right. In earlier versions the default was for the sidebar to be on the right and I prefer that arrangement. According to [this old Macworld article](https://www.macworld.com/article...
I'm currently using BBedit 14 and I can't find any option to move the sidebar from the left side of the screen to the right. In earlier versions the default was for the sidebar to be on the right and I prefer that arrangement. According to [this old Macworld article](https://www.macworld.com/article/201387/bbeditdrawer.html "Move BBEdit’s documents drawer to the other side") there is supposed to be a value in the **com.barebones.bbedit plist** file that controls this option, but when I read this file using defaults the suggested key **MultiDocumentWindows** doesn't appear to exist any more. Thank you in advance for any comments or suggestions.
Noel Whitemore (101 rep)
Jan 10, 2024, 12:59 PM
1 votes
1 answers
117 views
Some apps unexpectedly sorting "Aa" after "Z" (Danish Collation)
This is on Ventura 13.5.2, a machine where I've migrated through many computers and versions of Mac OS X, so there could be some lingering cruft causing this problem. To the best of my knowledge, I've only ever used en_US language/locale on my computer. I noticed today that Quicken was sorting the n...
This is on Ventura 13.5.2, a machine where I've migrated through many computers and versions of Mac OS X, so there could be some lingering cruft causing this problem. To the best of my knowledge, I've only ever used en_US language/locale on my computer. I noticed today that Quicken was sorting the names "Aaron" and "AARP" after the letter Z in my list of payees. BBEdit was doing the same. But a folders in the Finder were alphabetized correctly, and passing a list to sort in a Terminal window worked as well. From the Wikipedia page on Alphabetical Order , I learned that: "In the Danish and Norwegian alphabets, the same extra vowels as in Swedish (see below) are also present but in a different order and with different glyphs (..., X, Y, Z, Æ, Ø, Å). Also, "Aa" collates as an equivalent to "Å"." My Terminal shows the following:
$ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=
My "Language & Region" System Settings lists "English (US) -- Primary" as my only language, and "United States" as my Region. What other methods can I use to get or set macOS's language/region? Update: I checked another account that I recently created on this computer, and it lists "English -- Primary" as the language (note the missing "(US)"). When I sort in BBEdit from that account, I get the correct order. But I've been unable to get "English -- Primary" on my current account. I switched to French and removed English entirely, rebooted, and when I tried to add "English" instead of "English (US)", it still added the "English (US)".
tomlogic (151 rep)
Sep 21, 2023, 06:29 PM • Last activity: Oct 25, 2023, 05:46 PM
8 votes
6 answers
25371 views
BBEdit - The authenticated save for this file failed (application error code: 20004)
I'm trying to edit my hosts file with BBEdit 10. When I begin, it tells me to unlock the file with this message: > **Are you sure you want to unlock "hosts"?** > > You aren't a member of the group "wheel". I go ahead and unlock the file but I'm not able to save it. When I try to I get this error: >...
I'm trying to edit my hosts file with BBEdit 10. When I begin, it tells me to unlock the file with this message: > **Are you sure you want to unlock "hosts"?** > > You aren't a member of the group "wheel". I go ahead and unlock the file but I'm not able to save it. When I try to I get this error: > The authenticated save for this file failed (application error code: 20004) I can edit and save the file with TextEdit or Textmate, so I'm guessing that I *do* have the proper permissions. Why can't I save the file with BBEdit? Is it because I bought the App Store version instead of the direct download?
blogjunkie (812 rep)
Aug 17, 2011, 01:04 AM • Last activity: Oct 29, 2022, 01:38 PM
2 votes
1 answers
973 views
Is there a way to have BBEdit's "run in terminal" command use a different terminal emulator application?
I would prefer to use iTerm rather than the built-in OS X Terminal application. Is there a way to do this?
I would prefer to use iTerm rather than the built-in OS X Terminal application. Is there a way to do this?
AmbroseChapel (121 rep)
Oct 29, 2022, 06:28 AM • Last activity: Oct 29, 2022, 08:46 AM
0 votes
1 answers
148 views
Second Double Quotation Changing to Smart Quotes
One of the strangest things happening right now. In BBEdit, I am editing my `zsh` `aliases`. Some are playing out very strange. The second double quotations are changing the type to Smart Quotes. alias dothis="echo 'I want to eat fish'” ^ | | It only happens in BBEdit, and not in TextEdit, Mail.app,...
One of the strangest things happening right now. In BBEdit, I am editing my zsh aliases. Some are playing out very strange. The second double quotations are changing the type to Smart Quotes. alias dothis="echo 'I want to eat fish'” ^ | | It only happens in BBEdit, and not in TextEdit, Mail.app, or Notes. I've checked **System Preferences** > **Keyboard** > **Text** and have tried toggling the **Use smart quotes and dashes** and it simply won't fix. Any insight as to what could be the problem or how I can chase this down? It's an odd one.
Rich_F (273 rep)
Jan 5, 2022, 03:05 PM • Last activity: Oct 3, 2022, 02:08 PM
5 votes
3 answers
4953 views
What is the auto-save path in BBEdit 14?
For BBEdit 14, what is the path where unsaved files are auto-saved (for re-opening when BBEdit is restarted)? Many other[\[1\]][1] internet[\[2\]][2] sources[\[3\]][3] point to the path being `~/Library/Application Support/BBEdit/Auto-Save Recovery`, however on multiple machines I use, my unsaved fi...
For BBEdit 14, what is the path where unsaved files are auto-saved (for re-opening when BBEdit is restarted)? Many other[\[1\]][1] internet[\[2\]][2] sources[\[3\]][3] point to the path being ~/Library/Application Support/BBEdit/Auto-Save Recovery, however on multiple machines I use, my unsaved files still re-open despite the fact that the "Auto-Save Recovery" folder does not exist. I have even tried recursive-grep'ing my home directory for a unique string in one of my unsaved files, but I cannot find any match (grep never seems to complete, but that is a different issue).
Minute-Slice8546 (53 rep)
Jan 15, 2022, 09:30 AM • Last activity: Sep 15, 2022, 08:55 AM
1 votes
2 answers
1670 views
Sending commands from TextWrangler (BBEdit) to the terminal
I want to send commands from TextWrangler (or BBEdit) to the terminal. Even if [I found this][1], I don't understand how that works since I'm brand new to Unix and running Applescripts. tell application "BBEdit" set the_selection to (selection of front window as string) if (the_selection) is "" then...
I want to send commands from TextWrangler (or BBEdit) to the terminal. Even if I found this , I don't understand how that works since I'm brand new to Unix and running Applescripts. tell application "BBEdit" set the_selection to (selection of front window as string) if (the_selection) is "" then set the_selection to line (get startLine of selection) of front window as string end if end tell tell application "Terminal" do script with command the_selection in window 1 end tell I saved an Applescript that looks like this: enter image description here Now, what I think is to put the script in the TextWrangler Scripts Folder: enter image description here 1. But then, how do I send commands to the Terminal.app? 2. How can I press cmd + enter to send a line from TextWrangler to the Terminal?
M. Beausoleil (225 rep)
Jul 23, 2016, 02:48 AM • Last activity: Jun 27, 2022, 12:58 PM
0 votes
1 answers
50 views
Running two apps side by side with preferences?
I've read on here about running two Safari instances side by side, but for running two versions of an app side by side, is this possible on OS X other than using a VM? In my case, it's Big Sur, latest version on a 2019 MacBook Pro. A VM is overkill in this instance, as this is only for something lik...
I've read on here about running two Safari instances side by side, but for running two versions of an app side by side, is this possible on OS X other than using a VM? In my case, it's Big Sur, latest version on a 2019 MacBook Pro. A VM is overkill in this instance, as this is only for something like BBEdit, a HTML editor, or those sort of programs. How would you have two apps, but not sharing preferences, on the same user account, or is this not possible? I've already got a second admin account but this is more for my day-to-day one. It's for BBEdit. I'd welcome any advice as I've done some Google-ing but aren't sure.
avenas8808 (487 rep)
Aug 24, 2021, 12:44 PM • Last activity: Aug 24, 2021, 03:12 PM
0 votes
2 answers
486 views
Can't open text file from Finder without extension even though execute flag is not set
Running Big Sur 11.3.1 I've got loads of text (UTF8) data files coming in from another Mac that I'd like to just double click or drag and drop to BBEdit or TextEdit. The files have no file extension and I'm not supposed to be changing the names unless I work from duplicates. The files can be opened...
Running Big Sur 11.3.1 I've got loads of text (UTF8) data files coming in from another Mac that I'd like to just double click or drag and drop to BBEdit or TextEdit. The files have no file extension and I'm not supposed to be changing the names unless I work from duplicates. The files can be opened from a file dialog but that's a bit tedious. When I drop on BBEdit I get messages that say the file cannot be opened because the developer is unknown and "macos cannot verify that this app is free from malware". That's an absurd message for a text file. Any thoughts on fixing this? (already tried chmod -x)
John (123 rep)
May 15, 2021, 05:00 AM • Last activity: May 20, 2021, 02:12 AM
14 votes
8 answers
88994 views
How can I open a folder called something.app in various applications?
For whatever reason, I created a folder on my Mac called customer.app, and it contains a python module. I want to open that folder and it's files in applications like BBEdit and GitX, but the open dialog shows this folder as greyed out and won't let me select them. Are there any settings or properti...
For whatever reason, I created a folder on my Mac called customer.app, and it contains a python module. I want to open that folder and it's files in applications like BBEdit and GitX, but the open dialog shows this folder as greyed out and won't let me select them. Are there any settings or properties I can set on this folder to tell my Mac that it is just a regular old folder?
Chris (141 rep)
Aug 29, 2012, 09:43 PM • Last activity: Apr 22, 2021, 09:19 PM
1 votes
1 answers
638 views
Getting AppleScript function to pass string correctly
Someone please help me here and show me how to get this to work. I've checked examples on returning values from functions with this AppleScript, but something I am missing here. I'm trying to get the function, strTest(), to pass a string that will then be printed to the BBEdit editor. If I were to r...
Someone please help me here and show me how to get this to work. I've checked examples on returning values from functions with this AppleScript, but something I am missing here. I'm trying to get the function, strTest(), to pass a string that will then be printed to the BBEdit editor. If I were to replace the variable with a static string, that works. But this isn't working at all. I'm getting: "The variable theText is not defined." Does anybody see what's going on?
on strTest()
	set returntest to "this is a test"
	return returntest
end strTest

tell application "BBEdit"
	set theText to strTest()
	tell window 1
		set insertionP to get selection
		set text of insertionP to (theText & (text of insertionP))
	end tell
end tell
A Nichole (13 rep)
Aug 1, 2020, 04:02 AM • Last activity: Aug 1, 2020, 04:58 AM
24 votes
2 answers
17901 views
Tabs to spaces in BBEdit
How can I configure BBEdit to insert 4 spaces (or at least spaces up to the next column which is a multiple of 4)? I've checked "Auto-expand tabs" in the preferences, but it doesn't seem to be doing that.
How can I configure BBEdit to insert 4 spaces (or at least spaces up to the next column which is a multiple of 4)? I've checked "Auto-expand tabs" in the preferences, but it doesn't seem to be doing that.
Colen (505 rep)
May 17, 2011, 08:38 PM • Last activity: Jun 27, 2020, 05:34 PM
1 votes
1 answers
517 views
How make BBEdit Color Scheme follow system dark mode setting
BBEdit has an awesome setting to make the application appearance match the selected editor color scheme – so when selected, if you select a dark color scheme in Preferences, it puts the app's chrome into dark mode. I'm looking for the opposite. Is there a way to make BBEdit adopt the BBEdit Dark col...
BBEdit has an awesome setting to make the application appearance match the selected editor color scheme – so when selected, if you select a dark color scheme in Preferences, it puts the app's chrome into dark mode. I'm looking for the opposite. Is there a way to make BBEdit adopt the BBEdit Dark color scheme when the system is in dark mode, and the BBEDit Light color scheme when the system is not in dark mode? I don't think there's a simple BBEdit preference to do this, but BBEdit is legendarily AppleScriptable. I use the awesome app [Night Owl](https://nightowl.kramser.xyz) to switch my system between light and dark mode at sunrise and sunset, so I frequently change between light and dark modes for the OS, and I'd love it if BBEdit followed automatically. If there were an AppleScript that somehow either was triggered when the system changed modes, that periodically polled the system to see if it was light or dark and made sure that BBEdit was using the appropriate color scheme to match the system mode, or did something else creative to be sure that BBEdit used a light color scheme when I am writing things in the daytime and a dark color scheme when I am writing at night, that would be awesome. In case it matters, I'm running BBEdit 12.6.7 and macOS 10.14.5. BBEdit Preferences Window
Daniel (35304 rep)
Jun 24, 2020, 01:41 PM • Last activity: Jun 25, 2020, 06:23 AM
4 votes
4 answers
7027 views
Textwrangler Open File in New Tab
I just become a Mac user and I've been looking for a decent free code editor, thus I found Textwrangler. However, I like it a lot, I only have one problem with it. How does one open a new file in a new tab rather than a new window? I open a directory with it and have the tree, but each time when I c...
I just become a Mac user and I've been looking for a decent free code editor, thus I found Textwrangler. However, I like it a lot, I only have one problem with it. How does one open a new file in a new tab rather than a new window? I open a directory with it and have the tree, but each time when I click on a file it closes the current file I am viewing and opens the new one. enter image description here Is it possible to have things open in a new tab as when you one a link in a new tab in Chrome or more exactly how you open a new file in Notepad++ on Windows.
Dragos Rizescu (266 rep)
Mar 11, 2014, 10:46 PM • Last activity: Apr 20, 2020, 04:46 PM
2 votes
1 answers
1249 views
BBEdit Code Completion and other features found in Textmate
Sometime back in the early 2000s I switched from BBEdit to TextMate, but now it seems TextMate gets to be long in the tooth while the good folks at BareBones are still at it. The most convenient feature I am missing is the code completion by pressing the esc-key, which will cycle through suggestions...
Sometime back in the early 2000s I switched from BBEdit to TextMate, but now it seems TextMate gets to be long in the tooth while the good folks at BareBones are still at it. The most convenient feature I am missing is the code completion by pressing the esc-key, which will cycle through suggestions based on the current document as well as a code language library. example: with the following code: private var _hello:String = "Hello"; in Textmate when entering the character _ followed by a keyboard shortcut ( e.g. esc ) I would get the suggestion _hello as _hello is in the current document. if I would type Nu followed by a esc I would get Number since it is defined for the source language. The other feature would be the code snippets. For example: typing fn followed by the tab-key would give me function ():void{ }; with the cursor conveniently placed in front of the parentheses. The basic BBEdit code completion does not seem to achieve the same results. Does anyone here know how to achieve these features? Somehow BBEdit announced Kite support but judging by the absence of any documentation either with BareBones or Kite, I guess they had a fallout of sorts. Any tips greatly appreciated, thanks.
zantafio (257 rep)
Feb 26, 2019, 06:23 PM • Last activity: Apr 2, 2019, 07:10 AM
0 votes
2 answers
108 views
cannot compare pdf files
I have two pdf files under version control. When I use textwrangler to compare the difference I see jibberish fonts. I have attached the figure below: Please suggest what can be done to solve this. thanks. [![my outputs][1]][1] [1]: https://i.sstatic.net/G08tG.png
I have two pdf files under version control. When I use textwrangler to compare the difference I see jibberish fonts. I have attached the figure below: Please suggest what can be done to solve this. thanks. my outputs
sss_1983 (1 rep)
Mar 12, 2019, 02:23 PM • Last activity: Apr 2, 2019, 06:41 AM
2 votes
1 answers
165 views
Running script from BBEdit/TextWrangler gives "tput: No value for $TERM and no -T specified"
If I write a script in BBEdit/TextWrangler, e.g. #!/usr/bin/env python print 1234 and choose "Run" from the `#!` menu, I get this in a new document: 1234 tput: No value for $TERM and no -T specified tput: No value for $TERM and no -T specified tput: No value for $TERM and no -T specified How do I ge...
If I write a script in BBEdit/TextWrangler, e.g. #!/usr/bin/env python print 1234 and choose "Run" from the #! menu, I get this in a new document: 1234 tput: No value for $TERM and no -T specified tput: No value for $TERM and no -T specified tput: No value for $TERM and no -T specified How do I get rid of those 3 extra lines?
d0g (4072 rep)
Nov 25, 2018, 08:05 PM • Last activity: Feb 17, 2019, 07:01 AM
3 votes
3 answers
863 views
What’s the Java Shebang for OS X?
I just started using TextWrangler in place of Eclipse for writing Java programs. I found a script for testing Java programs in Terminal, but I’d like to handle everything right through TextWrangler. What’s the Java shebang for OS X? Or is there a Java shebang which is specifically for TextWrangler?
I just started using TextWrangler in place of Eclipse for writing Java programs. I found a script for testing Java programs in Terminal, but I’d like to handle everything right through TextWrangler. What’s the Java shebang for OS X? Or is there a Java shebang which is specifically for TextWrangler?
Jblagden (61 rep)
Mar 19, 2016, 07:28 PM • Last activity: Oct 25, 2018, 01:17 PM
Showing page 1 of 20 total questions