Sublime Forum

Its possible toget name and current line number from snippet

#1

Hey am trying to do something in php, string debugging in sublime text 3 with a snippet, the snippet looks like this:

[code]
<![CDATA[
MStrDebug( ${1:page} , ${2:func} , ${3:line} );
//code goes here…

MstrEndDebug();
]]>

strd

source.php
[/code]

so when i tape strd and press tab i got this :

[code]MStrDebug( page , func , line );
//code goes here…

MstrEndDebug();[/code]

so then i fill page,func and line manually.

what i want to know if these a way to trigger the current line and document name automatically within the snippet generating or something else.

the image of the out put looks like this ,and i dint set a 2nd parameter wish is a (func) to something because my code is not in a function scope, and for the function i can tape it manual, but others (page,line) its waste of time thx in advance

http://prntscr.com/95thmj

0 Likes