The Artima Developer Community
Sponsored Link

PHP Buzz Forum
Comfortable PHP editing with VIM

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Tobias Schlitt

Posts: 120
Nickname: dotxp
Registered: Sep, 2004

Tobias Schlitt is a geek, highly addicted to PHP.
Comfortable PHP editing with VIM Posted: Nov 11, 2004 11:40 AM
Reply to this message Reply

This post originated from an RSS feed registered with PHP Buzz by Tobias Schlitt.
Original Post: Comfortable PHP editing with VIM
Feed Title: Tobias Schlitt - Weblog
Feed URL: http://php-applications.de/lists/listinfo/phpug-dortmundlists/listinfo/phpug-dortmundlists/listinfo/phpug-dortmundlists/listinfo/phpug-dortmundlists/listinfo/phpug-dortmundlists/listinfo/phpug-dortmundlists/listinfo/phpug-dortmundlists/listinfo/phpug-dortmundlists/listinfo/phpug-dortmundlists/listinfo/phpug-dortmundlists/listinfo/phpug-dortmundlists/listinfo/phpug-dortmundlists/listinfo/phpug-dortmundlists/listinfo/phpug-dortmundapplications/blog/rss.php?category=2_PHP&version=0.91
Feed Description: a passion for php
Latest PHP Buzz Posts
Latest PHP Buzz Posts by Tobias Schlitt
Latest Posts From Tobias Schlitt - Weblog

Advertisement

I've always been a vi-hater, until I really came to know it. As most Unix newbes I first did not know in a way how to deal with vi in general and therefore never even touched it for years (I guess in the very first weeks, I did not even know, it exists).

After some month on Linux, someone threw me into cold water and told me to use vi for editing files and I tried, what resulted in the usual process (I imagine):

  1. "Damn, now I'm in here, but I cannot type anything!" *argh*
  2. "Bloody shit, I cannot even exit it anymore" *grmpf*

By mid of this year some friends tried to evangelise me to use vi and, I bet you know, the were successful. Even that successful, that I bought "Learning the vi editor"* a few weeks after they convinced me to try out vim. This is now nearly 6 month ago and I slowly start really getting used to some of it's neat functions and have some fixed set of settings, I'd like to provide to others.

Beside the usual options like autoindent, smartindent, nowrap and number, I created some nice shortcuts (for checking PHP syntax and for running "pear package" directly from the editor. But the most important feature I really like is creating code skeletons on the fly, using key mappings.

So, what does that basically mean? There are quite some constructs in PHP which you really use often, like if-statements, foreach-loops, class/method/attribute-definitions and so on. Usually people write that most of these once in a file (mostly with those definition parts) and then copy and paste the stuff. What I do since a few month now, is just typing (e.g.) "=cla" in vim's editing mode and a class defintion (including comments) appears and leaves me on a place where I can comfortably start filling it. Same for the other named constructs and some more.

I guess I sped up my code-writing speed by about 15% with that and it's pretty comfortable. So, if you like, check my current .vimrc here and try it out! Feedback, additions and hints are pretty welcome! :)

*A big recommendation on that book to everyone out there who's new to vi or one of it's clones!

Read: Comfortable PHP editing with VIM

Topic: Photos from the PHP Conference Previous Topic   Next Topic Topic: Impressions from the International PHP Conference

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use