Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Provide :Homestead command #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Provide :Homestead command #7

wants to merge 1 commit into from

Conversation

noahfrederick
Copy link
Owner

@noahfrederick noahfrederick commented Jan 30, 2018

Adds a :Homestead command for interacting with the Homestead VM from Vim's command line.

:Homestead {cmd}                                                  *:Homestead*
  Invoke shell {cmd} on the Homestead VM over SSH.

  Several strategies are tried for executing the ssh command in order:

    * Dispatch's |:Start| command
    * The built-in |:terminal|
    * At Vim's command line via |:!|

  The {cmd} is executed with the working directory being the project's
  directory on the VM. The project's directory is detected from your
  Homestead.json configuration file, using the "folders" mappings to do the
  translation from host path to guest path:
>
      "folders": [
          {
              "map": "~/code",
              "to": "/home/vagrant/code"
          }
      ],
<

  The plug-in will look for the Homestead.json file in the directory specified
  in |g:laravel_homestead_dir| or in ~/Homestead.

  Note: Only Homestead.json is taken into account, and not Homestead.yaml,
  since Vim cannot parse YAML. If you prefer to use the Homestead.yaml file,
  it's sufficient to set only the "folders" array in Homestead.json.


:Homestead
  Start an interactive SSH session on the Homestead VM.


:Homestead! [arguments]
  Invoke Vagrant with [arguments] in the context of the Homestead directory on
  the host machine. For example, to start the VM:
>
      :Homestead! up
<

@noahfrederick noahfrederick changed the title [WIP] Provide :Homestead command Provide :Homestead command Sep 13, 2020
@noahfrederick noahfrederick marked this pull request as draft September 13, 2020 14:33
@noahfrederick noahfrederick marked this pull request as ready for review October 4, 2020 21:05
Interact with the current project on a Homestead VM from the host
machine over SSH. See :help :Homestead for usage.
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant