DEV Community

MatsLeal
MatsLeal

Posted on

7 1

Vim & Laravel

Hello guys, I have recently been developing a few projects in Laravel, and, being myself a die hard Vim user, I prefer the MacVim approach, when I first started out with laravel, I decided to set some Vim mappings in order to integrate my laravel workflow into Vim, so far, i have this specific mappings:

"-----------------Laravel Specific Mappings---------------"
"Shortcut for routes/web.php file
nmap lr :tabedit routes/web.php

"Larvel Comands

"Migrate tables

nmap lmi :!php artisan migrate

"Creators

"Autocomplete for making a controller

nmap lmc :!php artisan make:controller

"Autocomplete for making a model

nmap lmm :!php artisan make:model

"Create a migrations table

nmap lmmt :!php artisan make:migration

"Finders

"Search Controllers directly in app/Http/Controllers

nmap lfc :CtrlPapp/Http/Controllers/

"Search the Migrations files

nmap lfdm :CtrlPdatabase/migrations/

"Search for data models under app/

nmap lfm :CtrlPapp/

"Search for view in resources/views/

nmap lfv :CtrlPresources/views/

"Search for database speeders

nmap lfs :CtrlPdatabase/seeds/

I do this because I have not seen a lot of laravel FUNCTIONAL plugins yet, and I would love to see that some one actually finds this poor mappings useful, cheers Vim users !!

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (1)

Collapse
 
iwkse profile image
iwkse

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay