How can I edit or insert a local file when using Tramp on Emacs?

时间:2016-04-04 16:53:52

标签: emacs tramp

I've been using Centos 7 Emacs Tramp mode to edit files remotely, but I can't find how to insert a local file into a remote file. I tried opening the local file first, but I think there must be a better way to do this. Thanks for your help.

1 个答案:

答案 0 :(得分:4)

Open the remote file with tramp, then from the tramp buffer do M-x insert-file and make sure the path is a local path (e.g. "/foo/bar" not "/ssh:user@host:/foo/bar").