GMate

GMate is a set of plugins for Gedit that aims to get a better development environment using this text editor, and some improvements for gtksourceview2 language files, especialy for Ruby and Rails development.

1. gtksouceview2 for ruby lang are described here

2. Smart Indentation plugin.

This is a plugin based on regular expressions, inspired by jEdit syntax files, where I found some base expressions for use here (in fact almost a copy and paste).
you can see the plugin in action in this screencast:

3. Extract partial plugin.

This is a Rails specific plugin to help partial extraction from an existing rhtml file, just select the part of text you want to put in partial and press CTRL+ALT+P to se a little window asking for partial name, put the name you want. A new partial will
be created in the same folder of current file with the name:
<pre>_[name you informed].[extension of current file]</pre>
then the selected text will be transfered to new file and a render partial statement
will appear in original document… Folow the screenshots to see what I mean:

Select te desired text:

Enter the partial name:

step2

Results in a new file:

and the partial statement:

Save the new file and old file to complete the operation.

See plugin in action in this screencast:

4. Todo List plugin… Follow this link.

WARNING: if you have custom code snippets, custom themes and custom plugins (like edited an existing plugin) backup your ~/.gnome2/gedit before installing using install.sh.

To download Gmate as a tarball click here
or
Clone directly from github:

git clone git://github.com/lexrupy/gmate.git

See also Rails Footnotes for linux, to meet a very usefull plugin used for Mac and Textmate Users

Issues and Bug reports here

  1. #1 by Chris on novembro 18, 2008 - 3:39 am

    Where is the download? I can’t see it anywhere on this page!

  2. #2 by Chris on novembro 18, 2008 - 3:43 am

    ok just found it on Git Hub – git clone git://github.com/lexrupy/gmate.git

  3. #3 by Gabriel on novembro 18, 2008 - 4:07 pm

    Cara, eu não consigo fazer o plugin “Advanced Bookmarks” funcionar, parece que ele veio junto com o pacote GMate.
    Toda vez que eu tento habilitá-lo o GEdit fecha sem retornar nenhum aviso de erro (nem pede pra salvar os arquivos abertos).

    Inclusive tentei baixar o plugin de novo mas não funcionou.

    Pode dar um help?

  4. #4 by Alexandre on novembro 18, 2008 - 5:28 pm

    Olá Gabriel,
    execute o gedit a partir de um terminal e envie a saída do console para o email simpsomboy [at] gmail [dot] com
    eu dou uma olhada para ver o que está acontecendo.
    envie também qual a versao do Ubuntu que você está usando
    att,

  5. #5 by Asyraf on dezembro 16, 2008 - 6:29 pm

    hi alexandre,

    i can’t seem to enable the automatic bookmarks plugin. gedit keeps closing on me everytime i try to enable it. any advice?

  6. #6 by Alexandre on dezembro 16, 2008 - 7:31 pm

    Hello,

    run gedit from command line, than send-me the output by email. I will analyse and try do solve for you.
    Since more people are having problems with this, I probably will remove from Gmate package, and you will can install directly from author site http://code.google.com/p/advanced-bookmarks-gedit-plugin/

  7. #7 by Asyraf on dezembro 19, 2008 - 3:49 pm

    alexandre,

    thanks for the tip, managed to fix it, here’s the output:

    asyraf@asyraf-laptop:~$ gedit
    Traceback (most recent call last):
    File “/home/asyraf/.gnome2/gedit/plugins/advanced-bookmarks/plugin.py”, line 55, in __init__
    self.read_config(conf_path)
    File “/home/asyraf/.gnome2/gedit/plugins/advanced-bookmarks/plugin.py”, line 119, in read_config
    self._conf_file = file(conf_path, “r+”)
    IOError: [Errno 13] Permission denied: ‘/home/asyraf/.gnome2/gedit/plugins/advanced-bookmarks/plugin.conf’
    Segmentation fault

    ran chmod on plugin.conf and was able to use the plugin

    Thanks!

  8. #8 by Alexandre on dezembro 19, 2008 - 5:29 pm

    Hello Asyraf,
    error message says you have a permission error on file /home/asyraf/.gnome2/gedit/plugins/advanced-bookmarks/plugin.conf

    try

    $ sudo chmod 664 /home/asyraf/.gnome2/gedit/plugins/advanced-bookmarks/plugin.conf
    and then
    $ sudo chown asyraf:asyraf /home/asyraf/.gnome2/gedit/plugins/advanced-bookmarks/plugin.conf

    it may solve you problem :-)

    Regards,

    Alexandre

  9. #9 by Virgilio on janeiro 14, 2009 - 10:03 pm

    Hi,

    I’ve started using your fantastic gmate, but I found something that looks as bug. Everytime I type a ” or a (, it comes up with three not two, like “”" o ())

    Anyway, many thanks for sharing it.

  10. #10 by Alexandre on janeiro 15, 2009 - 9:03 pm

    Hello,
    No it is not a bug, I thinkg it is happening because you have activated the Gemini plugin, for complete pairs, and also activated the gedit “brackets closing” plugin.
    you should use just one, I prefer to use Gemini because I already configured to complete more pairs.

  11. #11 by Asyraf on janeiro 16, 2009 - 4:28 am

    alexandre,

    managed to fix the problem.

    many thanks for the plugins – i loved gedit for my rails projects, now you’ve made it even better!

    Thanks again!

  12. #12 by Klaus on fevereiro 13, 2009 - 11:31 pm

    Hi Alexandre,

    thanks for the plugin!

    Just wanted to let you know about chuchiperriman’s GtkSourceCompletion & the Document Words Completion plugin he wrote for gedit:

    http://gtksourcecomple.sourceforge.net/

    Thought this might be interesting to follow. I don’t know much about the innards of GtkSourceView, but if I’m not completely mistaken this could be helpful to get Ruby Code Auto Completion into gedit. Please correct me if I’m wrong. :)

    -Klaus

  13. #13 by Alexandre on fevereiro 14, 2009 - 1:45 pm

    Hello Klaus,
    I already know about that plugin, but Ruby code completion isnt something easy to get working, because of dinamic nature of language.
    For now I already tried some other plugins to add words completion in Gmate, but I personally don’ t using, I prefer to let the Ruby and Rails API open in my browser.
    Thank’s for the tip.

  14. #14 by Klaus on fevereiro 14, 2009 - 3:44 pm

    Hi Alexandre,

    thanks for your reply. :) Please keep up the good work, your effort is much appreciated!

  15. #15 by Marcus Koze on fevereiro 15, 2009 - 11:33 pm

    Pffoa! Super pack, I like it a lot and find it most helpful in development. Many thanks !

  16. #16 by stephen on maio 5, 2009 - 3:57 pm

    EXCELLENT work

    thanks very much, it’s wonderful to be able to do what the mac rubyists take for granted

  17. #17 by alexandre on maio 5, 2009 - 4:09 pm

    Thank you for using, we need users that say what they think about the tool
    thank you for interest in Gmate

  18. #18 by tick on maio 8, 2009 - 5:45 am

    Thank you so much, I was on the lookout for a proper rails editor on linux.

    I already possess an e-textedior license, but their linux version isn’t finished.
    RedCar is also a very early draft.

  19. #19 by Andrzej on maio 10, 2009 - 4:00 am

    I’ve been using gmate for some time and it’s really great. But recently when I updated to Ubuntu 9.04 and installed it Tab width defaults to 4 all the time even if I set it to different value explicitly. Any ideas? I answered No for default plugin and config set during installation

  20. #20 by alexandre on maio 11, 2009 - 8:40 am

    I Already found this issue, and will commit the fix ASAP.
    Thank’s for using GMate

  21. #21 by Aziz Light on maio 23, 2009 - 4:34 pm

    Thanks so much for this plugin! It’s genius!
    Now I have textmate on ubuntu, it’s been a long time that I’m waiting for that.

  22. #22 by alexandre on maio 24, 2009 - 12:12 am

    you’re welcome,
    thanks for interest in Gmate. it is a try to make development fun on Linux.

  23. #23 by Asyraf on maio 25, 2009 - 4:33 am

    hey alexandre,

    how can we help with the development of this package?

  24. #24 by alexandre on maio 25, 2009 - 9:47 am

    Hello @Asyraf,
    You can make a fork of Github Project, than, add features, fix bugs, etc, and when you finished, make a pull request.
    You can also help using testing and reporting bugs, and also writing blog posts, documentation etc.

    Thank’s for interest in Gmate.

  25. #25 by rflribeiro on junho 19, 2009 - 11:50 pm

    Olá Alexandre. Parabéns pelo excelente trabalho com este plugin. Veja se consegue me orientar por favor… Estou tendo este problema somente com o TODO, rodando num Fedora 10. Desde já, obrigado.

    Traceback (most recent call last):
    File “/home/rflribeiro/.gnome2/gedit/plugins/todo/__init__.py”, line 162, in show_todo_marks
    root, title = self.get_root_directory()
    File “/home/rflribeiro/.gnome2/gedit/plugins/todo/__init__.py”, line 114, in get_root_directory
    fb_root = self.get_filebrowser_root()
    File “/home/rflribeiro/.gnome2/gedit/plugins/todo/__init__.py”, line 143, in get_filebrowser_root
    fbfilter = client.get(path).get_string()
    AttributeError: ‘NoneType’ object has no attribute ‘get_string’

  26. #26 by rubybox on junho 26, 2009 - 7:14 am

    If you use Debian on testing(squeeze), you will face with error

    “EventsCodes.IN_MOVED_TO | EventsCodes.IN_MOVED_FROM # watched events
    AttributeError: type object ‘EventsCodes’ has no attribute ‘ON_DELETE’”

    So I downgrade python-pyinotify to version 0.7.1-1 (pkg version of Lenny) aptitude install python-pyinotify=0.7.1-1

    It SOLVE the Problem.

  27. #27 by alexandre on junho 26, 2009 - 8:32 am

    @rflribeiro: qual a versão do Python você está utilizando?
    @rubybox: This seems to se a issue of GeditOpenFile plugin, since that plugin uses python-pyinotify, I will notify the plugin author about this

  28. #28 by alexandre on junho 30, 2009 - 12:02 am

    Hello,
    I started using the Github Issue System for GMate Project, so if you have an issue, please fill it there:
    http://github.com/lexrupy/gmate/issues

    Remember, before post a new bug report, make sure that it have not been reported yet by another user.

    Thank’s users for all feedback

  29. #29 by Daniel on julho 30, 2009 - 11:24 pm

    I’m having problems, it’s FORCING tabs as spaces(for both javascript and html) and 2 spaces for tabs (in html)
    also gedits normal auto tab doesn’t work with html anymore

  30. #30 by alexandre on julho 30, 2009 - 11:37 pm

    Hello Daniel, please fill an issue at github issue tracker at http://github.com/lexrupy/gmate/issues, so you can see the progress there
    thank you

  31. #31 by seb on agosto 11, 2009 - 9:07 am

    I prefer tabs over spaces. So I clicked Edit -> Preferences and unchecked the “Insert spaces instead of tabs” option. However next time I started gedit the options was restored. How can I prevent that?

    I really like gmate but I do find it annoying that it change settings that I manually defined.

    best regards,
    Seb

  32. #32 by alexandre on agosto 20, 2009 - 12:10 am

    Hello @seb,
    when you install Gmate and activate the smart indent plugin, that plugin assumes the control of tabs and spaces for each language you are editing, so the change you made globally take no effect.
    to prevent this, you can configure either the tabspaces and use of tab characters at Edit -> Smart Indent Configuration (Shift+Ctrl+Alt+T) and make your changes. remember that you need to set this to each language.
    Regards

  33. #33 by seb on agosto 26, 2009 - 1:24 pm

    Hi @Alexandre

    Shift+Ctrl+Alt+T have no effect. In fact it checks the “Use spaces” options as soon as I exits the dialog (using the apply button).

    If I enter the Edit -> Preferences dialog and unchecked the “Insert spaces instead of tabs” option the Shift+Ctrl+Alt+T dialog can be changed… but the option isn’t preserved.

  34. #34 by Pinheiro on setembro 1, 2009 - 3:31 pm

    Olá Alexandre. Você tem algum post ensinando a instalar o Gmate no Gedit for Windows? Aliás, dá para utilizar o Gmate no Windows? Estou começando agora a mexer com Rails e me falaram muito bem deste plugin.

    Abraço!

  35. #35 by alexandre on setembro 2, 2009 - 10:43 am

    Olá,
    Nunca testei, mas acredito que alguns plugins devam funcionar
    você vai precisar encontrar o local onde o gedit guarda as configuracoes locais, localizar a pasta plugins
    e copiar a pasta plugins do gmate para lá
    no linux a pasta é
    [diretorio do usuario]/.gnome2/gedit/plugins

    agora, se você vai mesmo utilizar Windows, considere utilizar o jEdit (tem um post sobre ele no meu blog também) ou o e-texteditor, este último é pago, mas tem uma versao 30 dias full, que voce pode testar antes e se valer a pena comprar a licença, que é baratinha, acho que $35 .

    Qualquer coisa poste aqui as experiências

    abraço

  36. #36 by Eiji on setembro 4, 2009 - 6:01 pm

    Alexandre,
    Thank you for this package.
    I use this all the time for PHP development.

    Thanks again.

  37. #37 by alexandre on setembro 6, 2009 - 10:36 pm

    Hello Eiji, Thank’s for using Gmate, if you have comments and sugestions please, let me know.

  38. #38 by krishna on outubro 16, 2009 - 3:49 am

    hello, does it work for all languages( ex. c,c++,python,shell script,tcl)?

  39. #39 by alexandre on outubro 16, 2009 - 8:14 am

    Yes, it works for all languages but have some more facilities for ruby and python.

  40. #40 by krishna on outubro 16, 2009 - 10:54 am

    thanks for quick reply. and i have another question. what is the proper way to completely remove this package from the system( i mean is there any script for removing this package)?

  41. #41 by alexandre on outubro 16, 2009 - 4:28 pm

    The best way to completely remove is use de debian package (for download on github http://github.com/lexrupy/gmate/downloads), but, if you used install.sh script, the best way is remove files located in .gnome2/gedit2/, but take care if you have added custom code snippets or plugins there, the files will be mixed. there is no already a script that can “undo” the instalation unless you use DEB package.
    if you install from DEB package you may want to install the custom snippets, so, after install run:
    gmate-installsnippets (with your user and without sudo)
    I hope it helps

  42. #42 by Alex on dezembro 4, 2009 - 9:07 am

    Whether it is necessary to expect the Widows-version of this remarkable set of plugins?

  43. #43 by karatedog on dezembro 20, 2009 - 6:43 pm

    Hi Alexandre!

    I’m glad I have found this package. I just wanted to install snap-open (to get acquainted with Ruby coding in gedit) but the installation instructions in the creator’s package are a tad bit out of sync with the content of the .tar, and no matter where and how I put files into the proper folder, it won’t appear in the Plugins tab in GEdit. This package solved the problem.
    Thank you.

  44. #44 by anselmo battisti on dezembro 30, 2009 - 9:59 am

    To add the repository of rails to ubuntu in apt use this command!

    sudo add-apt-repository ppa:ubuntu-on-rails/ppa

(não será publicado)