Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using edit-in-kitty as the default editor on remote hosts #5546

Closed
purpleKarrot opened this issue Sep 30, 2022 · 1 comment
Closed

Comments

@purpleKarrot
Copy link

I often ssh into remote hosts and work with git there. To select an editor, git respects the configuration core.editor and the environment variables $GIT_EDITOR and $EDITOR. But since edit-in-kitty is a shell function rather than a separate tool, it cannot be configured to be used as the default editor.

It would be nice if edit-in-kitty was implemented as a kitten instead of a shell function.

It would also be nice if the ssh kitten provided something like a kitty_as_editor option that sets the $EDITOR environment variable appropriately on remote hosts.

@kovidgoyal
Copy link
Owner

Simply copy the contents of the edit-in-kitty function into a shell
script and have the ssh kitten copy it to some place on your remote
PATH. And you can set EDITOR to whatever you like in ssh.conf and the
ssh kitten will forward it to the remote host for you.

Making it a kitten is sub-optimal because it then requires kitty to
exist on the remote host and kitty is only pre-compiled for a subset of common server
platforms. It's on my TODO list to create a statically
compiled multiplatform kitty-tool executable. If and when that gets done
it can host edit-in-kitty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants