Use BBEdit 9 as text editor in the Terminal

Matsaki

Registered
Before I could just type "$ bbedit file" Now I tried reading and installing instruktions from google but it don't work.

Any help pls.

Thanks,
Mats
 
From within BBEdit, there should be a command to "Install command-line tools."

Failing that, check your path and make sure it contains the path to your BBEdit binaries.
 
Sorry, I did not say that it's the files on my server that I try to open in BBEdit. And the command line tools is installed. It works on local files but not from the server that runs Ubuntu 7.10.
 
Last edited:
If the binaries are in /usr/bin (bbedit, bbdiff, etc.), and /usr/bin is in your $PATH shell variable, then there shouldn't be any problem.

What happens if you type "bbedit" in the Terminal without giving it a filename? Does it report that that's an invalid command, or does it invoke the command-line bbedit program (which will simply do nothing, other than allow you to type text)?
 
I get:

user@www:~$ bbedit
-bash: bbedit: command not found

But let me clarify again that it works on my computer lovally, but not when I SSH in to my server with Ubuntu.

So there must be something to install or config on Ubuntu maybe?
 
It's not possible (I'm pretty sure). When you're logged into the server via ssh you're talking to the server. How is the server supposed to know what bbedit is? What the command means?

I tried it long ago for fun, knowing full well it wouldn't work.

Just use ftp, if you use BBEdit's projects feature it will open a ftp file in a flash. Add it to the project.
 
I have a different answer from BBEdit forum now :)

The combination of [MacFuse][1] and [MacFusion][2] does the job for me.

I mount all my remote file systems via SSH and edit files on said
file systems with BBEdit, as if the files were local.

My only caveat: I prefer not to leave .DS_Store files scattered
through a remote system and, by default, the Finder writes .DS_Store
files to any mounted file system. To turn that off for
network-mounted volumes run the following command in Terminal.app:

$ defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool YES

Regards,

Brian Forte.

[1]: <http://code.google.com/p/macfuse/>
[2]: <http://macfusionapp.org/>
--
 
There's no need to use MacFuse in order to accomplish this: BBEdit has built-in FTP and SFTP file browsing/opening/saving built in.

If your server supports SSH, then you can SFTP into it. SFTP is simply FTP over an SSH tunnel. Simply instruct BBEdit to open an FTP/SFTP server, choose SFTP, then enter your ssh credentials.
 
Thanks,
I can get in with SFTP but my server says I do not have permissions to make changes. I guess there is no way to send sudo commands over BBEdit?
 
You're a sudoer (i.e. admin) on the server? It's not possible to use sudo in BBEdit AFAIK. (You actually download as the user logged in, and you're re-uploading the file after making changes, again as that user.) You'd need to use a local (local to the server, that is) editor then in a Terminal ssh-session. pico would probably be installed. If it's only about small changes, that'd work just fine. (Actually, pico is quite nice and does a lot of things well.)

You could, of course, use an ssh-shell to temporarily change the file's ownership and permissions, edit with BBEdit over SFTP and then, when changes are saved, revert the ownership and permissions.

It all depends on how many changes you want to make to how many files, really. If it's only about small things and a couple files, I'd go the pico-route.
 
I've found MacFuse and sshfs surprisingly easy to install and use.

I was using WebDAV to connect Versions to a Subversion working copy on a web server but it was not very reliable and pretty slow. So I tried out the above combination and it's pretty slick - fast and reliable.

And if you wish you can do the bbedit &#8216;file&#8217; command line thing if you want but it's just as easy to negotiate your way to the actual file using BBedit&#8217;s open dialog, use the file browser or add the files to a project.

I set up a QuicKeys shortcut to do the mount, click it, and the server shows up as a mounted disk in a few seconds.

Here are a couple links:
http://code.google.com/p/macfuse/wiki/MACFUSE_FS_SSHFS
http://groups.google.com/group/macfuse/browse_thread/thread/271439cfe1b5dd42

I know that it's using the same transport mechanism as SFTP but it's much more convenient, especially if you use BBedit's File Browser.
 
Last edited:
Back
Top