This Sublime Text plugin enables developers to quickly open Laravel Blade template files by parsing view names inside view() function calls.
When the cursor is on a line like this:
view('posts.index');
view('posts.index', compact('posts'));- Parses Blade view paths from statements like:
view('posts.index'),view('posts.index', compact('posts')), etc. - Converts dot notation (
posts.index) to Blade file paths:
resources/views/posts/index.blade.php - Opens the target view file directly in Sublime Text
- Supports flexible syntax with multiple arguments and whitespace
- Open Sublime Text.
- Go to
Preferences > Browse Packages. - Inside the
Userfolder, create a new file namedopen_blade_view.py. - Paste the plugin code into this file and save it.
You can press your configured shortcut key (e.g., Ctrl+Alt+V), and the plugin will open:
To add a custom shortcut:
- Go to
Preferences > Key Bindings. - Add an entry like this to your keymap file:
{ "keys": ["ctrl+alt+v"], "command": "open_blade_view" }Now you can press Ctrl+Alt+V to open Blade views instantly.
- Open a Laravel project in Sublime Text.
- Place the cursor anywhere on a line containing a
view('...')call. - Run the command:
- Either from the Command Palette:
View: Open Blade View - Or via a keyboard shortcut (see setup below).
- Either from the Command Palette:
- The corresponding Blade file will open automatically if it exists.