Home Download Buy Blog Forum Support

Newbie: couple of questions

Newbie: couple of questions

Postby phaistonian on Thu Oct 22, 2009 6:10 pm

First of all, Sublime Text is amazing. Period.

I am kinda new to this app though, so I have some tiny questions:

1. How do I make every new file I make have its default syntax theme (and type) set to PHP? (not it's plain text)
2. Is there a way to preview PHP files (just like Dreamweaver's F12 preview thingy) with Sublime?

Thank you.
phaistonian
 
Posts: 6
Joined: Thu Oct 22, 2009 6:07 pm
Location: Mires, Crete, Greece

Re: Newbie: couple of questions

Postby EJ12N on Thu Oct 22, 2009 7:20 pm

1. How do I make every new file I make have its default syntax theme (and type) set to PHP? (not it's plain text)

Can't do it right now, or at least I am not aware of this feature... Good news is that:
it is possible with a plugin. Hook into onNew(view) event and set syntax as PHP, shouldn't be too hard (but then again you being new to sublime I guess it makes it hard :()
2. Is there a way to preview PHP files (just like Dreamweaver's F12 preview thingy) with Sublime?

If I recall correctly f12 in dreamweaver previews current file in default browser... if that's the case yes you can do that in sublime, just right click on the file and select "open in browser", in sublime *almost* everything is configurable so of course you can bind that to f12 if you wish so, the command is openInBrowser put that in your user keybindings
Code: Select all
<binding key="f12" command="openInBrowser">
EJ12N
 
Posts: 281
Joined: Tue Apr 21, 2009 5:23 pm

Re: Newbie: couple of questions

Postby jps on Fri Oct 23, 2009 12:11 am

phaistonian wrote:How do I make every new file I make have its default syntax theme (and type) set to PHP? (not it's plain text)


Currently you'd have to write a plugin, but I'll change the 'new' command in the next beta so that you can give it a syntax file to use directly.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: Newbie: couple of questions

Postby sean on Sat Oct 24, 2009 11:07 am

this is working for HTML files, but for some reason it's not sending PHP files to my browser. any ideas?
sean
 
Posts: 14
Joined: Sat Oct 24, 2009 6:36 am

Re: Newbie: couple of questions

Postby phaistonian on Mon Oct 26, 2009 11:15 am

Thanks for the reply(ies) and please excuse my typos.

Another thing that I can't figure out if it's an options thing or a default behavior thing is the fact that the project's file selector dialog wont show the NEW files being made after the project was last opened.

The only workaround is to actually close the project and re-open it.

I am sure auto-populating the dialog with the new files would also come in handy.

Again, great app, thanks for making it.
phaistonian
 
Posts: 6
Joined: Thu Oct 22, 2009 6:07 pm
Location: Mires, Crete, Greece

Re: Newbie: couple of questions

Postby vim on Mon Oct 26, 2009 12:30 pm

add this to your user keybinding:

Code: Select all
<binding key="ctrl+shift+r" command="scanProject"/>
vim
 
Posts: 298
Joined: Tue May 27, 2008 6:51 pm

Re: Newbie: couple of questions

Postby phaistonian on Thu Oct 29, 2009 1:03 pm

Thanks @vim.

By the way, a tiny bug I just came upon:
Selecting using shift+cursor_down won't scroll the window - as excepted - when the selection's bottom row exceeds window height.
phaistonian
 
Posts: 6
Joined: Thu Oct 22, 2009 6:07 pm
Location: Mires, Crete, Greece


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 9 guests