Thanks, Steve and Chris for your recommendations. I will try both.
Rick Gordon
--------
Steve deRosier wrote:
Hi Rick,
I spend most of my time editing files that are on Linux boxes where
I've got ssh access only. I add this to my .bashrc:
export REMOTEHOST=`echo $SSH_CLIENT | cut -d ' ' -f 1`
export HOSTIP=`echo $SSH_CONNECTION | cut -d ' ' -f 3`
function bbedit {
# bbedit won't open a remote file via sftp if it doesn't exist. So, if
it's a new file
# create it, call bbedit to open, and then kill it.
FCREATED=0
if [ ! -e "$PWD/$1" ]
then
touch "$PWD/$1"
FCREATED=1
fi
ssh derosier@$REMOTEHOST /usr/local/bin/bbedit -c -u --front-window
"sftp://$USER@$HOSTIP/$PWD/$1"
# The above call will background and return immediately. The file will
open in bbedit
# but since we've created it, and we don't want to leave it around, we
kill it right away.
# If the user saves it, it gets recreated and content is saved. If
not, there's no file,
# so we're cool too. It's a bit odd, but it works.
if [ "$FCREATED" -eq "1" ]
then
rm "$PWD/$1"
fi
}
Then editing a file is as simple as `bbedit somefile.txt` It calls
back to my Mac and has bbedit open the file via sftp. Edit, hit cmd-s
and close the file/window as desired. Easy. Obviously you need ssh
server enabled and your keys setup to avoid password prompts, but you
can figure all that out.
Anyway, maybe that helps for you!
- Steve
On Mon, Apr 3, 2023 at 4:34 PM 'Gregory Shenaut' via BBEdit Talk
<[email protected] <mailto:[email protected]>> wrote:
You could consider using sshfs.
Greg Shenaut
Sent from my iPhone
> On Apr 3, 2023, at 14:21, Rick Gordon <[email protected]
<mailto:[email protected]>> wrote:
>
> Is there any way to get a subset of BBEdit-like functionality in
a Terminal editor?
>
> I often use BBEdit as a means of editing in the Terminal on my
own computer, but that doesn't work so easily with another
computer that I access via ssh, where I can't really exit the
Terminal to edit. though I could install a tool that I could run
in the Terminal.
>
> I see that there are a number of mouse-aware Terminal editors
that are available, and am just looking at ci-edit
<https://github.com/google/ci_edit>, though it seems sluggish.
>
> I'd appreciate any suggestions here. Thanks.
>
> ___________________________________________
> RICK GORDON
> EMERALD VALLEY GRAPHICS AND CONSULTING
> ___________________________________________
> WWW: http://www.shelterpub.com
>
> --
> This is the BBEdit Talk public discussion group. If you have a
feature request or need technical support, please email
"[email protected] <mailto:[email protected]>" rather than
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
> --- You received this message because you are subscribed to the
Google Groups "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected]
<mailto:bbedit%[email protected]>.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/bbedit/642B4195.9010704%40rickgordon.com.
--
This is the BBEdit Talk public discussion group. If you have a
feature request or need technical support, please email
"[email protected] <mailto:[email protected]>" rather than
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google
Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected]
<mailto:bbedit%[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/bbedit/87C1D38D-8CAA-4EEA-8FF4-CF9E7CFF0D5E%40me.com.
--
This is the BBEdit Talk public discussion group. If you have a feature
request or need technical support, please email
"[email protected]" rather than posting here. Follow @bbedit on
Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google
Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/bbedit/CALLGbR%2BUtEN%3Da6POaYcuRMSf_49TEoEi%3Dyn5mL1JYWDSfYW64A%40mail.gmail.com
<https://groups.google.com/d/msgid/bbedit/CALLGbR%2BUtEN%3Da6POaYcuRMSf_49TEoEi%3Dyn5mL1JYWDSfYW64A%40mail.gmail.com?utm_medium=email&utm_source=footer>.
___________________________________________
RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________
WWW: http://www.shelterpub.com
--
This is the BBEdit Talk public discussion group. If you have a feature request or need
technical support, please email "[email protected]" rather than posting here.
Follow @bbedit on Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/bbedit/642B854D.5020207%40rickgordon.com.