|
|
|
Sponsored Link •
|
|
Ruby Buzz Forum
RubyBuntu -6- gedit 3! wtf? set it up for ruby/web development :) 0 replies on 1 page. |
|
| Back to Topic List | Reply to this Topic | Search Forum | Threaded View |
|
|
Next Topic
|
|
| Flat View: This topic has 0 replies on 1 page |
Under the Font & Colors tab, you have to either select the RubyBuntuOne or the RubyBuntuTwo theme to use the enhanced language specifications from above. The redundant toolbar can be deactivated in the View menu. The default shortcut for toggling the bottom- and sidebars is (<Ctrl>+)<F9>. Hot hot keysBefore getting into the plugins, let me highlight that good shortcuts for good features are very important. What is the use of a plugin that you do not use, because you always forget how to use it? ubuntu/gnome offers a nice way to change menu shortcuts: The global Editable menu shortcuts setting. It allows you to change a shortcut of a menu item by moving the mouse over the item and pressing the desired shortcut. Unfortunately, it has disappeared in ubuntu 10.4 from the appearance settings. But it is not lost, it is just hidden. You can get it back in GNOME 3 with the gsettings command: And while we’re on it, let’s also improve the way the home key works in gedit (should jump to the first char, instead of the absolute beginning of a line): PluginsInstalling gedit plugins is quite easy. Just place the downloaded files of a plugin at: Below is a list of plugins I use, ordered by subjective importance. Every plugin without a download link is available in the official plugin package or in gmate(gedit3). I’ve alse added a shortcut suggestion for some of them. Snap openDownload. This is the most important plugin. Press the shortcut and type the filename you want to open – it integrates with the file browser pane and searches through all files in the selected root directory. In about 9 of 10 file switchings, I use this plugin.
Code commentComment out whole blocks of code with one keystroke.
Advanced Find/ReplaceDownload Full text search, unfortunately, not really stable :/. Useful non-gedit alternatives are, for example, the gnome-search-tool or grep:
alias grp='grep . --color=auto -r3e 'SnippetsAnother wonderful helper. It lets you easily include code templates by typing an alias and pressing <Tab>. Furthermore, it puts the cursor to the right spot (e.g. between the html tags). Some templates even have multiple cursor spots (hit tab again). Alternatively, you can press <Strg>+<Space> to get a list of available aliases (which is also nice for learning them). You can easily customize the snippets at Tools/Manage Snippets…. More on snippets in a future post.
Word completionThis plugin searches trough all open documents (which are quite a lot when using Snap open) and offers known words for completion.
Draw SpacesDraws little bullets as spaces and little arrows as tabs :).
External ToolsLets you execute any system command from within gedit! The definite toy for power users :). For example, you can easily execute your document as Ruby code with this snippet:
Input: Current DocumentOutput: Display in bottom pane Change ruby to ruby -c to only check the syntax. There are lots of more External Tools snippets at the gnome wiki and in this blog article. GNOME 3 stores the tools in ~/.config/gedit/tools. Little pitfall: When using Ruby via RVM, you need to load RVM (the code line you also find in your .bashrc) prior executing ruby. Alternatively, start gedit from a RVM-powered terminal.Smart HighlightDownload. Highlights all occurrences of the currently selected text. This one spots a lot of crazy typos!
Pair Character CompletionDownload. Automatically adds common characters like closing brackets – but there are occasions, where it does the wrong thing (e.g. you just need one " but get two ""). Nevertheless, I like it.
Color PickerOpen URI Context MenuDownload. Adds options for visiting and downloading links in its context menus.
Embedded TerminalA gnome-terminal in the bottom pane (
Strg+F9). I rather have my terminals in extra windows, but it is ok for a little irb.Regex Search and ReplaceDownload. Basic regex search.
I miss my gedit 2 plugins!!!11This list is definitely shorter than the one for gedit 2, many plugins are not ported, yet. For example, I haven’t found a replacement for these ones:
In addition, I miss an indent plugin that allows you to (un)indent using <Alt> and the arrow keys. Although gtksourceview (which is a part of gedit) offers indenting using (<Shift>)<Tab>, it’s absolutely not satisfying when trying to indent single lines. I will update this post with new gedit 3 compatible plugins that I’ll use (or maybe write). New plugins can also be found at:
Rails FootnotesLast but not least, some extra sugar for Rails-developers: The rails-footnotes gem! It adds useful information about the current Rails request to the bottom of each rendered browser page. It also provides helpful links to associated files – which open in gedit!
But that is still not everything… When you get an error page, you can click on the referenced line and gedit will open the accordant document and jump to the line!
Total convenience! I gained much productivity using this tool. Because it’s written with textmate in mind, some tweaking is needed. Let’s start with adding this line to the development section of your gem 'rails-footnotes'Then run the generator: rails generate rails_footnotes:installThe next step is to create a textmate handler that the browser uses to open After making this file executable ( Read: RubyBuntu -6- gedit 3! wtf? set it up for ruby/web development :)
| ||||||||||||||||||||||||||||||||||||||||||
|
|
Next Topic
|
|
Sponsored Links
|