All Projects → masasam → emacs-counsel-tramp

masasam / emacs-counsel-tramp

Licence: GPL-3.0 license
Tramp ivy interface for ssh and docker and ‎vagrant

Programming Languages

emacs lisp
2029 projects

Projects that are alternatives of or similar to emacs-counsel-tramp

avy-migemo
avy with migemo
Stars: ✭ 16 (-67.35%)
Mutual labels:  ivy, counsel
Swiper
Ivy - a generic completion frontend for Emacs, Swiper - isearch with an overview, and more. Oh, man!
Stars: ✭ 1,948 (+3875.51%)
Mutual labels:  ivy, counsel
teamcity-vagrant
No description or website provided.
Stars: ✭ 23 (-53.06%)
Mutual labels:  vagrant
misp-vagrant
Deploy MISP Project software with Vagrant.
Stars: ✭ 37 (-24.49%)
Mutual labels:  vagrant
lsp-metals
lsp-mode ❤️ metals
Stars: ✭ 49 (+0%)
Mutual labels:  melpa
svg-tag-mode
A minor mode for Emacs that replace keywords with nice SVG labels
Stars: ✭ 314 (+540.82%)
Mutual labels:  melpa
docker-hands-on-guide
Hands on guide for docker, k8s cluster lightweight virtualization.
Stars: ✭ 25 (-48.98%)
Mutual labels:  vagrant
dotfiles
My configuration files for Linux and macOS
Stars: ✭ 20 (-59.18%)
Mutual labels:  vagrant
rails-development-environment
Development environment for Ruby on Rails based on Vagrant, VirtualBox and Ubuntu 16.04 LTS (Xenial Xerus).
Stars: ✭ 50 (+2.04%)
Mutual labels:  vagrant
doom-todo-ivy
Display all TODO and FIXME entries for a project or buffer in ivy. Extracted from doom-emacs.
Stars: ✭ 31 (-36.73%)
Mutual labels:  ivy
pprzlink
Message and communication library for the Paparazzi UAV system
Stars: ✭ 17 (-65.31%)
Mutual labels:  ivy
counsel-org-clock
Counsel (Ivy) interface for org-clock
Stars: ✭ 44 (-10.2%)
Mutual labels:  ivy
terraform-provider-vagrant
A Vagrant provider for terraform.
Stars: ✭ 43 (-12.24%)
Mutual labels:  vagrant
dev-with-docker-on-ubuntu
After fighting with Docker on OSX and the need for 2-way syncs, fsevents, etc. I developed a desire to get back to a simple(r) development environment on a linux based VM. This project is a jumping off point.
Stars: ✭ 25 (-48.98%)
Mutual labels:  vagrant
nomad-demo
Vagrant based demo setup for running Hashicorp Nomad
Stars: ✭ 88 (+79.59%)
Mutual labels:  vagrant
emacs-run-command
Efficient and ergonomic external command invocation for Emacs
Stars: ✭ 64 (+30.61%)
Mutual labels:  ivy
vvv-multisite
[DEPRECATED] please see https://github.com/Varying-Vagrant-Vagrants/custom-site-template
Stars: ✭ 31 (-36.73%)
Mutual labels:  vagrant
IATI.cloud
The open-source IATI datastore for IATI data with RESTful web API providing XML, JSON, CSV output. It extracts and parses IATI XML files referenced in the IATI Registry and powered by Apache Solr.
Stars: ✭ 35 (-28.57%)
Mutual labels:  vagrant
vagrant-joyent
A Vagrant provider for Joyent
Stars: ✭ 30 (-38.78%)
Mutual labels:  vagrant
clipetty
Manipulate the system (clip)board with (e)macs from a (tty)
Stars: ✭ 91 (+85.71%)
Mutual labels:  melpa

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

Tramp ivy interface for ssh server and docker and vagrant

Screencast

counsel-tramp-gif

M-x counsel-tramp

counsel-tramp1

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

counsel-tramp2

Filter by counsel.

counsel-tramp3

You can connect your server with tramp.

counsel-tramp4

Selecting the list with sudo will lead to the server as root.

counsel-tramp5

Selecting the list of '/sudo:root@localhost:/' will open file at localhost as root.

counsel-tramp6

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!

counsel-tramp-quit

When you finish editing nginx.conf you clean the tramp buffer with counsel-tramp-quit command.

Requirements

  • Emacs 24.3 or higher
  • counsel 0.10.0 or higher

Installation

You can install counsel-tramp.el from MELPA with package.el (M-x package-install counsel-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") 'counsel-tramp)

If you want to speed up tramp

(add-hook 'counsel-tramp-pre-command-hook '(lambda () (global-aggressive-indent-mode 0)
				     (projectile-mode 0)
				     (editorconfig-mode 0)))
(add-hook 'counsel-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 counsel-tramp. Setting hook that turn on extensions when you execute counsel-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 counsel-tramp-custom-connections '(/ssh:domain|sudo:user@localhost:/))

Example when adding more than two connections manually.

(setq counsel-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 counsel-tramp-docker-user "username")

If you want to specify multiple user name list to connect with docker-tramp.

(setq counsel-tramp-docker-user '("username1" "username2" "username3" "username4"))

If you want to change initial directory when connecting with /sudo:root@localhost:.

(setq counsel-tramp-localhost-directory "/var")

Support for top-level sshconfig include

In addition to normal .ssh/config, it also supports the following format.

~/.ssh/config

Include conf.d/work
Include conf.d/personal

~/.ssh/conf.d/work

Host instance
	HostName ************
	User ************

Host archtest
	HostName ************
	User ************

Host debiantest
	HostName ************
	User ************

Host centostest
	HostName ************
	User ************

~/.ssh/conf.d/personal

Host myserver
	HostName ************
	User ************

Host myhost
	HostName ************
	User ************

Below is not support

~/.ssh/config

Include conf.d/**

Support controlmaster paths

You can use it as follows.

(setq helm-tramp-control-master t)

Set ~/.ssh/config as below

Host *
  ControlMaster auto
  ControlPath ~/.ssh/master-%r@%h:%p
  ControlPersist 30m
  ServerAliveInterval 60

Execute the ssh command as follows

~/.ssh/[email protected] will be generated automatically. Even if there is no connection setting in ~/.ssh/config, counsel-tramp can complement like bellow.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].