Home Download Buy Blog Forum Support

[BUG] commenting out php using command + /

[BUG] commenting out php using command + /

Postby mimoymima on Wed Jul 18, 2012 2:12 pm

When in an html file most things comment out nicely using the command + / shortcut, but php is doing this:

// <?php while (have_posts()) : the_post(); ?>

:shock:

even if I'm in the php statement it does that

other things like a div for instance seem to comment out fine using HTML comments:

<!-- <div id="content" class="clear-fix" role="main"> -->

even if I'm not in the div

I'm assuming this is a bug, let me know though

(by the way Sublime Text Rules, I'm in the middle of making the switch from TextMate

brent
@
mimoYmima.com
mimoymima
 
Posts: 3
Joined: Wed Jul 18, 2012 8:14 am

Re: [BUG] commenting out php using command + /

Postby Xavura on Thu Jul 19, 2012 9:38 pm

Try editing Comment.tmPreferences in $PACKAGE_PATH/PHP/

This could likely be the cause of the issue:
Code: Select all
         <dict>
            <key>name</key>
            <string>TM_COMMENT_START</string>
            <key>value</key>
            <string>// </string>
         </dict>
Xavura
 
Posts: 19
Joined: Sat Jul 14, 2012 4:40 pm

Re: [BUG] commenting out php using command + /

Postby mimoymima on Sun Aug 05, 2012 7:46 pm

way beyond me, I was more hoping that this would just be fixed in a future version of sublime... 8-)

brent
@
mimoymima.com
mimoymima
 
Posts: 3
Joined: Wed Jul 18, 2012 8:14 am

Re: [BUG] commenting out php using command + /

Postby jmh on Thu Jan 22, 2015 9:09 pm

I'm having this same issue in ST3 still, but I don't have a PHP folder under packages - where should this code go?
jmh
 
Posts: 2
Joined: Thu Jan 22, 2015 9:05 pm

Re: [BUG] commenting out php using command + /

Postby FichteFoll on Sat Jan 24, 2015 9:02 pm

This is a problem with how the PHP syntax is included in HTML and how ST assumes embedded languages are included, and a rather complex one to fix.

Reported at https://github.com/SublimeTextIssues/De ... /issues/94
FichteFoll
 
Posts: 565
Joined: Fri Mar 16, 2012 11:49 pm
Location: Germany

Re: [BUG] commenting out php using command + /

Postby jmh on Mon Jan 26, 2015 3:49 pm

Huh, interesting - I could swear this was working in ST2 as expected. Maybe I was using a plugin.
jmh
 
Posts: 2
Joined: Thu Jan 22, 2015 9:05 pm

Re: [BUG] commenting out php using command + /

Postby FichteFoll on Fri Jan 30, 2015 2:30 am

It might. Afaik the PHP and HTML syntax have been updated/changed in ST3.
FichteFoll
 
Posts: 565
Joined: Fri Mar 16, 2012 11:49 pm
Location: Germany


Return to Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 8 guests