Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Keymaps #205

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions Default.sublime-keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
[
// press $ when selecting text to wrap it in blade echo tags and a variable
{
"keys": [
"$"
],
"command": "insert_snippet",
"args": {
"contents": "{{ \\$${0:$SELECTION} }}"
},
"context": [
{
"key": "selector",
"operator": "equal",
"operand": "text.html.blade",
"match_all": true
},
{
"key": "setting.auto_match_enabled",
"operator": "equal",
"operand": true
},
{
"key": "selection_empty",
"operator": "equal",
"operand": false,
"match_all": true
}
]
},
// press ! when selecting text to wrap it in blade raw echo tags and a variable
{
"keys": [
"!"
],
"command": "insert_snippet",
"args": {
"contents": "{!! \\$${0:$SELECTION} !!}"
},
"context": [
{
"key": "selector",
"operator": "equal",
"operand": "text.html.blade",
"match_all": true
},
{
"key": "setting.auto_match_enabled",
"operator": "equal",
"operand": true
},
{
"key": "selection_empty",
"operator": "equal",
"operand": false,
"match_all": true
}
]
}
]
Binary file added images/dollar-on-selection.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/exclaimation-on-selection.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 11 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This package adds syntax definitions for the [Laravel](http://www.laravel.com) B

### Sublime Text Manual Install

1. Download or clone this repository into ```[install-dir]/Packages/laravel-blade```
1. Download or clone this repository: ```git clone https://github.com/Medalink/laravel-blade.git Laravel\ Blade\ Highlighter```
2. Restart Sublime Text.
3. Reopen any ```.blade``` files.
4. Enjoy :)
Expand All @@ -28,6 +28,16 @@ This package adds syntax definitions for the [Laravel](http://www.laravel.com) B

*[Material Theme](https://github.com/equinusocio/material-theme).*

#### Keymaps

Press `$` when you have a selection active:

![Dollar on selection](images/dollar-on-selection.gif "Dollar on selection")

Press `!` when you have a selection active:

![Exclaimation on selection](images/exclaimation-on-selection.gif "Exclaimation on selection")

#### Supported Extensions

* [Blade Extensions Laravel Package](https://github.com/RobinRadic/blade-extensions)
Expand Down