Coder Social home page Coder Social logo

vagrant-tramp's Introduction

Vagrant TRAMP

Synopsis

vagrant-tramp adds an Emacs TRAMP method for Vagrant boxes. As far as Vagrant is concerned, the TRAMP vagrant method behaves like the built-in vagrant ssh command does. The vagrant-tramp method simply provides auto-completion and a wrapper around vagrant ssh for connecting to boxes.

Installation

If you have a recent Emacs with package.el, you can install vagrant-tramp from MELPA.

Or via el-get

Otherwise add it to your emacs load-path.

Usage

The TRAMP method vagrant uses vagrant global-status to get a list of running Vagrant boxes for completion:

C-x C-f /vagrant:

Find file: /vagrant:
-> devbox:
   esxbox:
   kafka-broker1:
   kafka-broker2:
   kafka-zookeeper:

Boxes are named using the Vagrantfile directory basename and the VM name (excluding default) to support multi-VM environments. TRAMP opens a connection by cd-ing into the Vagrantfile directory and running vagrant ssh $box_id.

Opening a file as root

Use this trick from the Emacs Wiki, where we replaced "ssh" with "vagrant" and where "box" is a Vagrant box name:

C-x C-f /vagrant:box|sudo:box:/path/to/file RET

vagrant-tramp-term

The vagrant-tramp-term function provides a convenient way to vagrant ssh into a box using an ansi-term.

M-x vagrant-tramp-term

vagrant ssh to box:
-> devbox:
   kafka-broker1:
   kafka-broker2:

See also

vagrant-tramp's People

Contributors

ryanprior avatar dougm avatar acowley avatar kotfic avatar ibrahima avatar bryant1410 avatar syohex avatar zonuexe 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.