<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web side of life &#187; php</title>
	<atom:link href="http://blog.ivanjovanovic.com/topic/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ivanjovanovic.com</link>
	<description>by Ivan Jovanovic</description>
	<lastBuildDate>Tue, 13 Sep 2011 14:17:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>TextMate for PHP development</title>
		<link>http://blog.ivanjovanovic.com/2010/12/29/textmate-for-php-development/</link>
		<comments>http://blog.ivanjovanovic.com/2010/12/29/textmate-for-php-development/#comments</comments>
		<pubDate>Wed, 29 Dec 2010 00:08:18 +0000</pubDate>
		<dc:creator>Ivan Jovanovic</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://blog.ivanjovanovic.com/?p=97</guid>
		<description><![CDATA[If you want to improve your productivity and programming skills in general, getting to know better the tools you use every day is one of  the important things to invest your time in. Keyboard shortcuts of your favorite editor are especially important and using them in your daily routine will save you lot of hand [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to improve your productivity and programming skills in general, getting to know better the tools you use every day is one of  the important things to invest your time in. Keyboard shortcuts of your favorite editor are especially important and using them in your daily routine will save you lot of hand movements towards mouse, lot of context switching and will help you focus on what is important.</p>
<p>I use TextMate for everyday PHP development and I find it excellent. There are some features that more complex IDEs provide out of the box, but after you get used to work with TextMate and learn how to be productive you can hardly find better option. Keyboard shortcuts are one of its good parts and key to boosting your productivity.</p>
<p><span id="more-97"></span></p>
<p>There are some general purpose shortcuts that will work on any type of document, therefore on PHP files as well.</p>
<p>Regarding the notation: <strong>A + B</strong> means press in same time, <strong>A -&gt; B</strong> means type A and then after it press B</p>
<ul>
<li><strong>mate filename1 filename2</strong> &#8211; you can always start TextMate from command line and give list of files/folders to open</li>
<li><strong>open projectname.tmproj</strong> &#8211; if you saved your TextMate project to a file, which is good way to preserve custom project configuration, you can open it from shell with standard OSX <em>open</em> command</li>
<li><strong>Cmd + T</strong> &#8211; search for file in the project</li>
<li><strong>Cmd + Shift + F</strong> &#8211; search for a given string through all files in the project</li>
<li><strong>Cmd + F</strong> &#8211; regular search for a given string in current file</li>
<li><strong>Ctrl + S</strong> &#8211; faster way to search for strings in current file. Notice the input text box at the bottom of you TextMate window. Hit Esc to get out of fast search mode.</li>
<li><strong>Cmd + Shift + T</strong> &#8211; search for a function/class name in current file</li>
<li><strong>Cmd + Ctrl + R</strong> &#8211; see where the current file is in the project folder tree.</li>
<li><strong>Ctrl + W</strong> &#8211; select whole word under cursor</li>
<li><strong>Ctrl + Shift + A</strong> &#8211; gives you the list of SVN commands to execute on current file or folder if it is selected in project file tree.</li>
<li><strong>Ctrl + Shift + G</strong> &#8211; gives you the list of Git commands to execute on current file or folder if it is selected in project file tree.</li>
<li><strong>Alt + Mouse Selection</strong> &#8211; selecting in vertical blocks has never been easier, and editing afterwards as well <img src='http://blog.ivanjovanovic.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>Set of shortcuts for doing fast search and replace
<ul>
<li><strong>Cmd + E</strong> &#8211; set keyword to be replaced</li>
<li><strong>Shift + Cmd + E</strong> &#8211; set replacement word</li>
<li><strong>Ctrl + Cmd + F</strong> &#8211; replace in current file</li>
<li><strong>Ctrl + Shift + Cmd + F</strong> &#8211; replace in selection only</li>
</ul>
</li>
</ul>
<p>Great thing about TextMate is its possibility to be customized for specific needs by adding so called <a title="Textmate bundles" href="http://manual.macromates.com/en/bundles#bundles">bundles</a>. TextMate comes with <a title="Default PHP Bundle" href="https://github.com/textmate/php.tmbundle">default PHP bundle</a> embedded. You can see all the functionalities it provides in <em>TextMate -&gt; Bundles -&gt; Bundle Editor -&gt; Show Bundle Editor</em> or <strong>Ctrl + Alt + Cmd + B</strong> as shortcut. Here are some interesting ones from this bundle or useful for development in general</p>
<ul>
<li><strong>Esc</strong> &#8211; hitting escape after you typed couple of letters  will do code completion from the symbols defined in current editing file. Will work as well for native PHP functions. Just start typing <em>mk</em> and hit <em>escape</em> then and it will complete it as <em>mktime</em> <img src='http://blog.ivanjovanovic.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li><strong>Alt + Esc</strong> &#8211; this will give you list of possible completions. After selecting one of them, you&#8217;ll get full function signature injected in the document.</li>
<li><strong>Ctrl + H</strong> &#8211; will give you PHP documentation related to the selected word in your current editing document.</li>
<li><strong>Ctrl + Shift + V</strong> &#8211; will check your file for syntax validity.</li>
<li><strong>Shift + Cmd + D</strong> &#8211; will jump to file that is included in the current PHP file.</li>
<li><strong>doc -&gt; Tab</strong> &#8211; if you type word <em>doc</em> above class/method/function and hit Tab after it, you will get documentation block for the related entity.</li>
<li><strong>Cmd + Shift + R</strong> &#8211; will run your file with current system PHP executable. This is very nice when you just test something and want to see the output, but don&#8217;t want to get out to shell and command line.</li>
<li><strong>Alt + F1</strong> &#8211; documentation about function signature in the form of tooltip. If you forgot weather $haystack or $needle goes first as the param in the array function this is easy way not to search through extensive documentation.</li>
<li><strong>Shift + Ctrl + T</strong> &#8211; if you like to place lot of <em>TODO</em>, <em>FIXME</em> or <em>CHANGED</em> meta information in your comments for later addressing, this will help you find them quickly and navigate through them easily.</li>
</ul>
<p>Beside these shortcuts there are a lot of snippets triggered by hitting Tab after typing its abbreviation. For example <strong>doc_f -&gt; Tab</strong> will create new function together with doc block. You can see list of all of them in the mentioned bundle editor in the section for PHP bundle. It is pretty easy as well to create your own specific snippets.</p>
<p>Many more general or specific shortcuts can be found online e.g. as printable <a href="http://www.g-design.net/textmate.pdf">cheat</a> <a href="http://www.grayskies.net/TMcheatsheet.pdf">sheets</a>. Or in TextMate <a href="http://manual.macromates.com/en/">manual</a>. The best way to adopt them is to take them one by one and pay attention to use it regularly, as soon as it is at the back of the brain start with new one until you become TextMate productivity wizard.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ivanjovanovic.com/2010/12/29/textmate-for-php-development/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP debugging with FirePHP</title>
		<link>http://blog.ivanjovanovic.com/2008/08/31/php-debugging-firephp/</link>
		<comments>http://blog.ivanjovanovic.com/2008/08/31/php-debugging-firephp/#comments</comments>
		<pubDate>Sun, 31 Aug 2008 22:17:49 +0000</pubDate>
		<dc:creator>Ivan Jovanovic</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://ivan/?p=1</guid>
		<description><![CDATA[I really like when I stumble upon a creative and useful piece of software that could improve my everyday development process. I remember when I started using FireBug it was great help in the HTML/CSS/JavaScript development and debugging. I&#8217;ve just found out FirePHP, FireBug plugin that enables the developer to send log messages from PHP [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" style="margin: 3px;" src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/6149" border="0" alt="FirePHP logo" hspace="3" vspace="3" width="32" height="31" align="left" />I really like when I stumble upon a creative and useful piece of software that could improve my everyday development process. I remember when I started using FireBug it was great help in the HTML/CSS/JavaScript development and debugging.</p>
<p>I&#8217;ve just found out <strong>FirePHP</strong>, FireBug plugin that enables the developer to send log messages from PHP code to FireBug console. Quite helpfull I can say <img src='http://blog.ivanjovanovic.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  It consists of Firefox extension (mentioned FireBug plugin) and small PHP logger that you actually use in your code to communicate with the FireBug console. Logger comes in procedural and object-oriented fashion so if you are striving towards exceptional performance of your PHP app, or just still old-school PHP4 (R.I.P.), then man you have your choice <img src='http://blog.ivanjovanovic.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Otherwise use OO PHP5 logger class. I&#8217;ve manage to set the demo, that goes within the PHP library, in a couple of minutes and I&#8217;m looking forward for using it in the future.</p>
<p>Thanks guys for great work.<br />
<a title="Official FirePHP website" href="http://www.firephp.org/">Official FirePHP website</a></p>
<p>Another cool thing that comes with the FirePHP is its integration posibilities with CakePHP, CodeIgniter, Drupal, ExpressionEngine, Kohana, PRADO, Symfony, TYPO3, <strong>Zend Framework.</strong> So there is some for anyone.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ivanjovanovic.com/2008/08/31/php-debugging-firephp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

