TextMate with gedit
It turned out that in the office I work for Mac, but the laptop - “17 MacBook Pro is not the best, in my opinion, option in terms of performance / price. Anyway, this is a topic for another conversation. Laptop under Ubuntu.
And now the question is: if you are coding in Ruby / RoR - who is your best Text Receiver? That's right, Textmate is the Great Fetish and Idol of all Mac Ruby programmers. So the task was extremely simple - to find a tool for Linux that is as close as possible to Textmate in terms of the amount of functionality that I use in my work.
It was difficult for me to determine where to post this small note because it relates to three topics at once: Linux, Ruby, usability. By and large, all of the following will relate to configuration methods and work in Linux. For Linux users with an experience of up to 1 year :)
Oddly enough, after some wanderings, the choice fell on the editor lying “under his nose” - gedit . The advantages are decent: included in the default Ubuntu kit, easy to climb, GTK, flexible due to plugins, free / opensource.
So, let's start customizing to high standards :)
First of all, I installed in addition to Monospace two other equally favorite fonts:
MONACO.TTF - the one that defaults to Textmate (download from here , but I'm not sure of the legality of this action )
And CONSOLAS.TTF from MS. Here it’s a little more complicated:
1) We download the PowerPoint presentation viewer
2) If it’s not worth it, then put sudo apt-get install cabextract
3) Extract: cabextract PowerPointViewer.exe
4) Another extract: cabextract ppviewer.cab
All the fonts we have must be in ~ / .fonts (if it is not, then create such a directory in the home folder)
5) find -iname '* ttf' -exec cp {} ~ / .fonts / \;
Further in gedit: Edit - Options - Font and Colors.
Now we add color schemes and syntax highlighting.
For gedit, all this economy should be in:
/usr/share/gtksourceview-2.0/styles/
That's why we go to a wonderful resource , download it, follow the instructions and rewrite it into the target directory under administrator rights. Of course, in order to achieve maximum similarity with Textmate, first of all, download one of the dark themes - Darkmate
We also figured out the color, we turn to the most delicious - to the functional. These are plugins. First of all, if you didn’t do it before, do:
sudo apt-get install gedit-plugins
(Edit - Options - Modules)
What gives us a couple of delicious goodies in the face:
1. The built-in terminal (I used to do everything with my hands - that's why I I don’t like NetBeans Ruby and Aptana)
2. Snipetov (press CTRL-SPACE and get quick access to enter the structure templates, or type the first construction operator + TAB and get the same thing)
3. File structure (oh yes!) in the sidebar. In fact, working comfortably without this with Ruby / RoR is not possible by definition.
4. Class structure in the current open file
5. Character table.
These are the main plugins. Many other things can be found there . By default, gedit plugins should be in:
~ / .gnome2 / gedit / plugins
(If we don’t have any directory, we create it)
The whole charm of plugins is that they can dig, but they can not dig. This is to ensure that for comfortable work you are likely to find a dozen or two add-ons you need. (By the way, you can add something yourself )
Now almost everything is fine. But. If the syntax of the .rb files of the latest versions of gedit supports "sparks", then to work with .rhtml and .rjs you need to take a couple of gestures - like everything under Linux, it's very simple:
wget grigio.org/files/x-rhtml.xml
sudo mv x-rhtml.xml / usr / share / mime / packages
wget grigio.org/files/rhtml.lang
sudo mv rhtml.lang /usr/share/gtksourceview-1.0/language-specs/
As a result, it comes out very nice and archi-friendly for work. Use on health. Perhaps I forgot about something or did not take it into account ... so remind! After all, it seems that comments are needed for this, m?
PS By the way. If it’s interesting, I can write about how vim turns into a hardcore and cross-platform tool for a Ruby developer who develops on a not-so-powerful machine or fan of vim as such. Let me know :)