+ ssh ido trigger

This commit is contained in:
Thomas von Dein
2017-08-01 15:33:58 +02:00
parent 09d4b9a6f4
commit 74487fe4a4
2 changed files with 467 additions and 445 deletions

11
.emacs
View File

@@ -595,6 +595,7 @@
;; 20170801.01 ;; 20170801.01
;; - added C command to magit to switch repo ;; - added C command to magit to switch repo
;; - add : trigger for ido-find-file to begin with tramp
;; ** TODO ;; ** TODO
@@ -4676,6 +4677,16 @@ defun."
(interactive) (interactive)
(if (looking-back "/") (if (looking-back "/")
(insert "~/") (insert "~/")
(call-interactively 'self-insert-command))))
;; same thing, but for ssh/tramp triggered by :
(define-key ido-file-completion-map
(kbd ":")
(lambda ()
(interactive)
(if (looking-back "/")
(progn
(ido-set-current-directory "/ssh:")
(ido-reread-directory))
(call-interactively 'self-insert-command)))))) (call-interactively 'self-insert-command))))))
;; by howardism: [re]open non-writable file with sudo ;; by howardism: [re]open non-writable file with sudo

File diff suppressed because it is too large Load Diff