During the Mayflower barcamp 2009 we (Stephanie and Maria) decided to develop a pastebin module for Phprojekt6.
Pastebins are an easy way to share code among developers. Often instant messaging systems are used for that purpose which is not quite comfortable (formatting gets lost, searching in history is tedious, security issues). There are a view public pastebins but the problem is, that everyone can access your code snippets. This is not always allowed when developing software for customers. So we thought a pastebin module for P6 would be great, since the access is limited to the users of P6.
With the P6 Pastebin Module you can do the following things:
- create, update and delete code snippets
- simply share the code snippets by passing the link to other users
- comment code snippets
- apply automatic line numbering of the code
- mark code lines
- use themes to present the code snippets in different styles.
A default code snippet is shown in the following screenshot.
To implement the syntax highlighting we were using the dojox.highlighter and added functionalities
like code marking and line numbering. The themes are provided by dojox.highlight and allow you to color the code in different ways like Emacs or Borland style. More than ten themes are available at the moment.
The picture below shows the „native“ theme.
The P6 Pastebin module will be available with the next release of Phprojekt6. Use it for more effective collaboration with your fellow developers or for creating a valuable personal code snippet library that documents your evolving skills as a developer!
Have fun using the P6 Pastebin module! We look forward to receiving your comments!
All the best Stephanie & Maria