tag:blogger.com,1999:blog-13700803.post-36107758931598499332007-09-10T00:36:00.000-03:002007-09-10T01:17:09.548-03:00GObject skeleton generator for VimSo after reading <a href="http://blog.gustavobarbieri.com.br/2006/09/02/developing-gobject-based-classes-using-emacs/">this</a> blog entry from Gustavo, I found it interesting and decided to do the same for Vim, as I would never use Emacs :D. So I found this <a href="http://www.vim.org/scripts/script.php?script_id=2003">script</a> and did some small changes to make it fit better the GTK+ coding style.<br /><br />To use the script first copy it to ~/.vim/plugin directory, then open a file with vim and run one of the commands:<ul style="font-style: italic;"><li>GOBGenerateH</li></ul><blockquote>To generate the class definition.</blockquote> <ul><li><span style="font-style: italic;">GOBGenerateC</span></li></ul> <div style="text-align: left;"><blockquote>To generate the class implementation.</blockquote></div>Both commands will use the filename as default for the class name. You can change it, by typing the class name manually. It will replace "-" with "_" and also try to apply <a href="http://en.wikipedia.org/wiki/CamelCase">Camel Case</a> to the filename. For example a file named test-object.h will generate a class named TestObject.<br /><br />If you are interested, you can download the updated version of the script from <a href="http://andrunko.googlecode.com/svn/trunk/vim/scripts/gobgen.vim">here</a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13700803-3610775893159849933?l=andrunko.blogspot.com'/></div>Andre Moreira Magalhaes (andrunko)http://www.blogger.com/profile/14668638448861180171noreply@blogger.com2