From 2ca205201d6d1b17d458187602136c83eba88f7c Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Sun, 8 Mar 2015 23:10:32 -0400 Subject: [PATCH] Edit vagrant layer README and minor refactor of packages.el --- contrib/vagrant/README.md | 54 ++++++++++++++++++++----------------- contrib/vagrant/packages.el | 36 ++++++++++++------------- 2 files changed, 47 insertions(+), 43 deletions(-) diff --git a/contrib/vagrant/README.md b/contrib/vagrant/README.md index b54725b80..e350db6fd 100644 --- a/contrib/vagrant/README.md +++ b/contrib/vagrant/README.md @@ -16,14 +16,12 @@ ## Description -This layers adds support for working with Vagrant using -[vagrant.el](https://github.com/ottbot/vagrant.el) and -[vagrant-tramp](https://github.com/dougm/vagrant-tramp) +This layer adds support for working with Vagrant using [vagrant.el][] and +[vagrant-tramp][]. Features: - - - manage boxes (under the `SPC V` prefix) - - remote editing on Vagrant boxes via tramp + - manage boxes (under the SPC V prefix) + - remote editing on Vagrant boxes via Tramp ## Install @@ -32,33 +30,39 @@ Features: To use this contribution add it to your `~/.spacemacs` ```elisp -(setq-default dotspacemacs-configuration-layers '(vagrant)) +(setq-default dotspacemacs-configuration-layers '(ruby vagrant)) ``` +**Note** Since vagrant files are written in `ruby` it is recommended +to install the `ruby` layer as well. + ### Vagrant -Follow the -[Installing Vagrant](http://docs.vagrantup.com/v2/installation/index.html) -and -[Getting Started](http://docs.vagrantup.com/v2/getting-started/index.html) -guides in Vagrant's documentation. +Follow the [Installing Vagrant][] and [Getting Started][] guides in +Vagrant's documentation. ### Testing If you'd like to test this layer out in a simple way (for example to -make sure you have Vagrant configured correctly) there is a -[Vagrantfile](Vagrantfile) in this directory. +make sure you have Vagrant configured correctly) there is a [Vagrantfile][] +in this directory. ## Keybindings -Key Binding | Description -------------|----------------------------------------------------------------------------------------------- -`SPC V V` | bring up a Vagrant box -`SPC V p` | (re)provision a box that is already up -`SPC V D` | destroy a box -`SPC V s` | view the status of running boxes in the current project -`SPC V S` | suspend a box -`SPC V r` | resume a suspended box (you can also use `SPC V V` for this) -`SPC V H` | halt (shut down) a box -`SPC V e` | edit the `Vagrantfile` -`SPC V t` | start a `vagrant-tramp-term` session - after start, edit files at `/vagrant:box_name:filename` +Key Binding | Description +-------------------|----------------------------------------------------------------------------------------------- +SPC V D | destroy a box +SPC V e | edit the `Vagrantfile` +SPC V H | halt (shut down) a box +SPC V p | (re)provision a box that is already up +SPC V r | resume a suspended box (you can also use `SPC V V` for this) +SPC V s | view the status of running boxes in the current project +SPC V S | suspend a box +SPC V t | start a `vagrant-tramp-term` session - after start, edit files at `/vagrant:box_name:filename` +SPC V V | bring up a Vagrant box + +[vagrant.el]: https://github.com/ottbot/vagrant.el +[vagrant-tramp]: https://github.com/dougm/vagrant-tramp +[Installing Vagrant]: http://docs.vagrantup.com/v2/installation/index.html +[Getting Started]: http://docs.vagrantup.com/v2/getting-started/index.html +[Vagrantfile]: Vagrantfile diff --git a/contrib/vagrant/packages.el b/contrib/vagrant/packages.el index c9a9e39a7..2333a3470 100644 --- a/contrib/vagrant/packages.el +++ b/contrib/vagrant/packages.el @@ -13,24 +13,24 @@ vagrant-tramp)) (defun vagrant/init-vagrant () - (use-package vagrant - :defer t - :init (progn - (spacemacs/declare-prefix "V" "vagrant") - (evil-leader/set-key - "VV" 'vagrant-up - "Vp" 'vagrant-provision - "VD" 'vagrant-destroy - "Vs" 'vagrant-status - "VS" 'vagrant-suspend - "Vr" 'vagrant-resume - "VH" 'vagrant-halt - "Ve" 'vagrant-edit)))) + (use-package vagrant + :defer t + :init + (progn + (spacemacs/declare-prefix "V" "vagrant") + (evil-leader/set-key + "VD" 'vagrant-destroy + "Ve" 'vagrant-edit + "VH" 'vagrant-halt + "Vp" 'vagrant-provision + "Vr" 'vagrant-resume + "Vs" 'vagrant-status + "VS" 'vagrant-suspend + "VV" 'vagrant-up)))) (defun vagrant/init-vagrant-tramp () (use-package vagrant-tramp - :defer t - :init (progn - (vagrant-tramp-enable) - (evil-leader/set-key - "Vt" 'vagrant-tramp-term)))) + :init + (progn + (vagrant-tramp-enable) + (evil-leader/set-key "Vt" 'vagrant-tramp-term))))