Tinkeray
Heavily inspired by the absolutely awesome Tinkerwell, run Laravel artisan tinker
from a Vim buffer with output in Ray
Installation
-
Install using vim-plug or similar:
Plug 'jesseleite/vim-tinkeray'
-
Add Tinkeray's mapping to stub and/or open a blank
tinkeray.php
in your project when you want to tinker:nmap
t TinkerayOpen -
Optionally add
tinkeray.php
to your global git excludes, so that you don't have to ignore it in each project.
Usage
-
Install Ray into your project (or check out spatie/global-ray):
composer require spatie/laravel-ray
-
Run
:TinkerayOpen
(or activate the above mentioned mapping) to stub out and/or open a blanktinkeray.php
file in your project when you want to tinker. -
Open the Ray desktop app.
-
When you save
tinkeray.php
, you should see your returned output in Ray. -
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!
- Spatie and BeyondCode for rad tooling!
- Jose Soto for contributions, slick ideas, and teamwork!