News for hackers. Stuff that matters.

Ask HN: What do you use for editing when you SSH into a remote terminal?

Lately I've been editing files on my local system through an IDE, and through Putty I just paste the code into the proper file through VIM (vim somefile -> gg -> dG -> shift-insert). If it's particularly complex i'll pull from git, but that often makes testing little things very hard, and makes me use vim for the majority of the edits. What's a better way of doing this?
( 6 comments | on HN )
Re:Ask HN: What do you use for editing when you SSH into a r... by Gibbon1 on Monday October 05, 2020 @04:34PM (#24691722)
I'm not going to mention the IDE I use because no one else uses it but it supports SFTP. So I can use that to edit files remotely. 99% of my use was editing and running python on a embedded linux board. If your preferred editor supports SFTP or similar that's a good option.
Re:Ask HN: What do you use for editing when you SSH into a r... by jlund-molfese on Monday October 05, 2020 @04:28PM (#24691649)
If you're on Linux, SSHFS is a decent option when you also need to transfer larger files.

I like not dealing with latency while typing, so I'll usually edit locally and occasionally run the code on the remote server

Re:Ask HN: What do you use for editing when you SSH into a r... by dbergamin on Monday October 05, 2020 @04:21PM (#24691588)
VSCode remote plugin is pretty great if you're doing heavy editing. Probably wouldn't hook it up to a production machine though, it leaves a bit of cruft around. You could also look to enhance your vim experience, a few plugins and most importantly, some practice, can turn it into an efficient text editor.

It is hard to say, as the requirement you have doesn't sound very standard so we might need to know a bit more to help.

Re:Ask HN: What do you use for editing when you SSH into a r... by GrumpyYoungMan on Monday October 05, 2020 @05:05PM (#24692042)
Use rsync to copy the files over. It only transfers changed files and can use file compression to reduce bandwidth so it's highly efficient.
Re:Ask HN: What do you use for editing when you SSH into a r... by bartvk on Monday October 05, 2020 @04:20PM (#24691582)
I’d test little things with a unit test. One step up, I'd make a local test environment. Beyond that, I’d create a "deploy" target in my makefile, which does an efficient installation to your target (you don't specify what you're building, but that target may be a test server, a mobile device, an embedded board I dunno).
Re:Ask HN: What do you use for editing when you SSH into a r... by FandangoRanger on Monday October 05, 2020 @07:19PM (#24693125)
emacs + tramp