blob: 897d48c477349e69a28133ca2cd347ef99c198bd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
;;; my-tramp.el --- Configure tramp -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
(customize-set-variable 'tramp-default-method "ssh")
(customize-set-variable 'tramp-histfile-override t)
(customize-set-variable 'tramp-ssh-controlmaster-options "-o ControlMaster=auto -o ControlPath='tramp.%%C'")
(defcustom my/ssh-hosts '("192.168.0.1:9922"
"192.168.0.106")
"List of hosts I regularly connect to."
:type '(repeat string)
:group 'tramp)
(defun my/ssh-cd-home ()
"Prompt for an SSH host and open a DIRED buffer on that machine."
(interactive)
(let ((machine (completing-read "Machine: " my/ssh-hosts)))
(find-file (format "/ssh:%s:~" machine))))
(provide 'my-tramp)
;;; my-tramp.el ends here
|