Created
September 7, 2013 14:40
-
-
Save iansinnott/6476131 to your computer and use it in GitHub Desktop.
I've included a description of what I hope this would do bellow, but I think the easiest way to solve this would just be to change the line of your code that includes the match() function. If I new regex this would probably be pretty easy to exclude the string 'php' from the match so that the function wouldn't run expansion if tab was hit after …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
</head> | |
<body> | |
<!-- So when i'm in an html document like this and I want to start typing php, I will just type 'php' as bellow --> | |
<!-- The '_' marks where the cursor is when I hit the tab key --> | |
php_ | |
<!-- Then I would want that to expand to the line bellow, placing the cursor in the newly opened php tag --> | |
<?php _ ?> | |
</bod> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ok, that makes a lot more sense in what you're trying to do :-)
the simplest thing would be to add
if match(line, 'php') > -1
to do something specifically forphp
.i believe emmet itself can also be configured to define custom expansions like this, so consult its documentation for how to do it.
hope that helps!