Remote file editing in Emacs

카테고리 없음 2010. 5. 20. 10:41
tramp를 쓰면 간단히 해결된다.
TRAMP는 "Transparent Remote (file) Access, Multiple Protocol"의 줄임말이다.
.emacs에 다음 내용을 추가한다.

(require 'tramp)
(setq tramp-default-method "scp")


파일을 열때 (C-x C-f) 입력형식:
/host:path/to/file


원격 파일을 편집하는 도중에 M-x shell을 해보라. 원격지의 shell이 뜬다. 이게 아마도 file을 괄호친 이유일까?

언제봐도 emacs는 간결하고 아름답다.

2008-11-10 약간의 응용(로컬 파일을 루트 권한으로 다시 열기)

C-x C-f /sudo::/path/to/file RET

KLDP에 내가 답변으로 올렸던 글인데... 매번 까먹는다. 이놈의 건망증이란... Orz.

http://manywaypark.tistory.com/entry/emacs%EB%A1%9C-%EC%9B%90%EA%B2%A9-%ED%8C%8C%EC%9D%BC-%ED%8E%B8%EC%A7%91%ED%95%98%EA%B8%B0-editing-remote-file-with-emacs#recentTrackback

: