jesseleite / vim-tinkeray

πŸ”« Artisan tinker from a Vim buffer with output in Ray

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tinkeray

Heavily inspired by the absolutely awesome Tinkerwell, run Laravel artisan tinker from a Vim buffer with output in Ray πŸ”«

Installation

  1. Install using vim-plug or similar:

    Plug 'jesseleite/vim-tinkeray'
  2. Add Tinkeray's mapping to stub and/or open a blank tinkeray.php in your project when you want to tinker:

    nmap <Leader>t <Plug>TinkerayOpen
  3. Optionally add tinkeray.php to your global git excludes, so that you don't have to ignore it in each project.

Usage

  1. Install Ray into your project (or check out spatie/global-ray):

    composer require spatie/laravel-ray
  2. Run :TinkerayOpen (or activate the above mentioned mapping) to stub out and/or open a blank tinkeray.php file in your project when you want to tinker.

  3. Open the Ray desktop app.

  4. When you save tinkeray.php, you should see your returned output in Ray.

  5. Order pizza! πŸ• 🀘 😎

Laravel Sail

If you are using Laravel Sail, you will also need to add the following to your vim config:

call tinkeray#set_sail()

By default, this will configure Tinkeray to use the default laravel.test Docker service setup by Sail. If you have customized this in your docker file, you may pass your service name into the above set_sail('my-service.test') function.

Thank You!

About

πŸ”« Artisan tinker from a Vim buffer with output in Ray


Languages

Language:Vim Script 63.1%Language:PHP 36.9%