Git Product home page Git Product logo

emacs-helm-tramp's Introduction

helm-tramp melpa badge melpa stable badge License: GPL v3

Tramp helm interface for ssh server and docker and vagrant

Screencast

helm-tramp-gif

M-x helm-tramp

helm-tramp1

Display server list from your ~/.ssh/config with helm interface.

helm-tramp2

Filter by helm.

helm-tramp3

You can connect your server with tramp.

helm-tramp4

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.

helm-tramp5

You can edit your server's nginx.conf on your emacs!

docker-tramp

If you are using docker-tramp, docker is also supplemented. If you are using vagrant-tramp, vagrant is also supplemented.

docker-tramp1

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

Besides ~/.ssh/config, you can add connections manually.

(setq helm-tramp-custom-connections '(/ssh:domain|sudo:user@localhost:/))

Example when adding more than two connections manually.

(setq helm-tramp-custom-connections '(/ssh:domain|sudo:user@localhost:/ /ssh:domain2|sudo:user@localhost:/))

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")

emacs-helm-tramp's People

Contributors

danlamanna avatar masasam avatar olymk2 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.