GitHub - masasam/emacs-helm-tramp: Tramp helm interface for ssh and docker and ...
source link: https://github.com/masasam/emacs-helm-tramp
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
helm-tramp
Tramp helm interface for ssh server and docker and vagrant
Screencast
M-x helm-tramp
Display server list from your ~/.ssh/config with helm interface.
Filter by helm.
You can connect your server with tramp.
Selecting the list with sudo will lead to the server as root.
Selecting the list of '/sudo:root@localhost:/' will open file at localhost as root.
You can edit your server's nginx.conf on your emacs!
If you are using docker-tramp, docker is also supplemented
If you are using vagrant-tramp, vagrant is also supplemented
You can edit docker container on your emacs!
helm-tramp-quit
When you finish editing nginx.conf you clean the tramp buffer with helm-tramp-quit
command.
Requirements
- Emacs 24.3 or higher
- helm 2.0 or higher
Installation
You can install helm-tramp.el
from MELPA with package.el
(M-x package-install helm-tramp
).
You can install docker-tramp.el
from MELPA with package.el
(M-x package-install docker-tramp
).
You can install vagrant-tramp.el
from MELPA with package.el
(M-x package-install vagrant-tramp
).
I recommend you are going to install exec-path-from-shell.
Sample Configuration
(setq tramp-default-method "ssh")
(define-key global-map (kbd "C-c s") 'helm-tramp)
If you want to speed up tramp
(add-hook 'helm-tramp-pre-command-hook '(lambda () (global-aggressive-indent-mode 0)
(projectile-mode 0)
(editorconfig-mode 0)))
(add-hook 'helm-tramp-quit-hook '(lambda () (global-aggressive-indent-mode 1)
(projectile-mode 1)
(editorconfig-mode 1)))
Setting hook that turn off slow extensions when you execute helm-tramp.
Setting hook that turn on extensions when you execute helm-tramp-quit
command.
If you don't make a backup files and lockfiles at remote server, it will be saved faster.
(setq make-backup-files nil)
(setq create-lockfiles nil)
Misc setting
If the shell of the server is zsh it is recommended to connect with bash.
(eval-after-load 'tramp '(setenv "SHELL" "/bin/bash"))
If you want to specify the user name to connect with docker-tramp.
(setq helm-tramp-docker-user "username")
If you want to specify multiple user name list to connect with docker-tramp.
(setq helm-tramp-docker-user '("username1" "username2" "username3" "username4"))
If you want to change initial directory when connecting with /sudo:root@localhost:.
(setq helm-tramp-localhost-directory "/root")
Recommend
-
152
easy-hugo ...
-
92
README.md
-
41
README.md My dotfiles based on Makefile Synopsis
-
35
Join GitHub today GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software togethe...
-
13
Emacs is amazing. It’s a very different sort of thing than a code text editor like Vim or an IDE like VSCode. It’s a different way of thinking of how to interact with a computer, where you build up techniques on top of simple tricks that let you...
-
5
helm-ag.el Introduction helm-ag.el provides interfaces of The Silver Searcher with helm. Features Support multiple search tools(ag...
-
6
如何让Tramp支持访问Termux Tramp ssh协议访问Termux 当使用Tramp通过ssh访问Termux上的文件时,你可能会发现出现下面这样的错误: tramp-file-name-handler: Method ‘ssh’ should specify both encoding and decodi...
-
7
tramp的一般用法 Table of Contents 1 使用tramp编辑远程文件 借助TRAMP,你可以像编辑本地文件一样来编辑远程文件. tramp的用法很简单,只要你在 C-x C-f 选择文件时使用一种特...
-
3
tl;dr: Securely preside over your EC2 darlings with TRAMP mode.Cattle not petsThe majority of AWS EC2 I need to operate these days are members of Kubernetes clusters. For remote access to them I’m more com...
-
1
Emacs tramp Mon, Feb 9, 2009 • Tooling 很好用的东东,可以方便的打开需要root权限或...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK