Posted: July 25th, 2009 | Author: Kevin | Filed under: Development, Tips, Tool | Tags: indentation, productivity, vim | No Comments »
Quickly reformat your document in VIM with:
gg=G
gg goes to the beginning of the document
= kicks off the indent filter (:help = for more information)
- G goes to the end of the document
Another way to achieve the same result through visual mode is.
ggvG=
gg goes to the beginning of the file
v enables visual mode
G goes to end of the file
= apply indentation
Similarly, if you are on a line that needs formatting, simply use ==, or v=. You can also select a block of code in visual mode and press = to reformat the selection.
Breath this command and make your team happy.
If you find this post useful, please drop a line in the comments.
Posted: April 10th, 2009 | Author: Kevin | Filed under: Development, PHP, Tool | Tags: netbeans, PHP, productivity, Tool | 7 Comments »
A recent contract job required me to work on-site, which meant that I had to use my laptop as my primary development rig. In eclipse, my low-end 1st gen Macbook Air crawls to its knees (surprise!) when I load it up with a 5000+ file project (including libraries).
Textmate is normally my tool of choice. But since we use a monster framework, code completion and inline documentation will undoubtedly boost my productivity and increase my familiarity with the existing API + codebase, not to mention the added benefit of a debugger to step through the code to know wtf is going on.
I went on a mission to find a new IDE. I decided to revisit Netbeans for PHP (I use it for Java already) by trying out the prerelease. After using Netbeans 6.7 M2 (and recently M3) for 2 months at work, aside from the occasional bugs, I could not be more impressed by its performance and feature-set. If you do decide to try it out, make sure you use the latest milestone release. That would be 6.7 M3 as of this post.
Lets look at some of the key features that I use on a daily basis.
Read the rest of this entry »