Diakonos - version 0.8.8
Version 0.8.8 of Diakonos is now available. This release delivers several new features, and also brings about a big change…
No more gem
Beginning with this release, I am doing something radical: I am not releasing Diakonos as a Ruby gem. While that may seem strange to some, I think the move is not only justified, but better for Diakonos.
I don’t believe Diakonos has a tremendously large user base at the moment. According to DistroWatch and LinuxRank, Ubuntu is easily the most popular Linux distribution. If Diakonos is to gain any popularity, it behooves me to ensure that it installs onto and plays well with Ubuntu.
I noticed that the Debian package for Diakonos had fallen behind my upstream releases (it was stuck at 0.8.4). I exchanged e-mails with Ralph Amissah, the maintainer of the Debian package (and, by extension, indirect maintaner of the Ubuntu package too), and was thereby informed that the inception of the new help system (introduced in 0.8.6) impeded the downstream updates. In particular, Diakonos’ downloading of configuration and help files for first time users was behaviour that ran contrary to Debian policy.
I think Debian and Ubuntu users who are not advanced Linux users would be more inclined to install packages via the apt system, as opposed to via RubyGems.
Furthermore, I have concluded that the RubyGems system is tailored much more towards libraries, and not applications. It’s great for putting files where Ruby’s
load statements can find them. But it’s not so well suited to moving global configuration files into
/etc, or system-wide documentation into
/usr/share/doc. I mumbled about this over two years ago. At first, I worked around the problem by having Diakonos installed via RubyGems, and then downloading configuration files (and, later, help files) from the Internet when the user first runs Diakonos. But, as I’ve mentioned, this prevented smooth inclusion into the Debian package repositories.
RubyGems is focused on letting Ruby developers disseminate their libraries to other Ruby developers; Diakonos is an end-user application. That it is written in Ruby is secondary and peripheral; it is not my intention to present a cute novelty to the amusement and delight of a fraction of the developers of a subculture programming language. My goal is to create the most user-friendly console editor for Linux (”a Linux editor for the masses”).
In light of these facts, I elected to abandon the RubyGems system in favour of a custom installer (
install.rb in the package). This installer would allow a distro package maintainer to install Diakonos to specific locations of his or her choosing in the filesystem. I envision that package maintainers for all distros should have little difficulty using it to create or update their packages. Of course, it is easy to use for the end user himself, as well. It can be used to install Diakonos completely in userspace (i.e. somewhere under a user’s home directory, without the need for root/sudo privileges).
The new package (simply a tarball) contains everything needed to run Diakonos, including default configuration files and a full set of help files. Diakonos no longer accesses the Internet for these like it used to in previous versions.
Configuration is loaded from the system-wide location (specified during installation), but user-specific overrides are (as before) loaded from
Configuration settings can now be inherited (cascaded). Simply use an equals sign (=) to set one setting to the value of another.
one.setting = another.setting
For an example, have a look at the Ruby language definition in the default config file. See how the shared settings are defined earlier in the file.
This inheritance will work for any setting, not just formatting. The important thing to remember is that Diakonos will parse configuration files top to bottom, and visit each
included file in the order the
include directives are encountered, with a depth-first strategy. So you should define ancestor settings before descendant settings.
You can now switch between block (columnar) selection and normal (flow) selection. Default keychains: <Alt-Shift-M, B> for block, <Alt-Shift-M, N> for normal. Mnemonic: M for Mark, B for Block, N for Normal.
Default keychord <Alt-Shift-L> can be used to toggle line numbering on and off. Line numbers appear in a left-side margin. Enable line numbering permanently by setting
true in your config. Set
view.line_numbers.width to the number of columns to use for the line numbering margin.
view.line_numbers.number_format is the setting to use to define a
sprintf format for the line numbers. Set the colour and brightness with
Code block navigation
A cool thing I’ve added in this release is code block navigation. Using Ctrl-PageDown, you can jump to the next code block of the same indentation level as the current line. Ctrl-PageUp goes back in the opposite direction (up or previous block). You might use this to easily browse: the methods of a class; or the different
when clauses of a Ruby
case expression; or the components of an
if-elsif-else tree; or the rules of a CSS stylesheet; and so on. Diakonos will automatically limit the extent of the navigation, so if you start your browsing within an
if-elsif tree, your cursor won’t jump outside that tree if you press Ctrl-PageDown too many times.
Alt-PageDown brings the cursor one block level deeper; Alt-PageUp brings you out one level.
You can now define column markers using the
view.column_markers.* settings. I’ve provided an example in the default config:
Uncommenting or adding these lines would set up a column marker named “margin”. The name “margin” is arbitrary; use whatever names you want for your markers. The “margin” marker would highlight the 80th column using the format code 9 (white on red in the default 16-colour configuration).
You might use such a column marker as a visual cue to help you not exceed a certain line length. You can set up as many column markers as you like.
Remove word from input line
Pressing Ctrl-W on the input line will now delete the last word on the line. I mainly included this to lop off file path components when opening new files or grepping directories.
Ruby 1.9 and 1.8 support
Ruby 1.9 support is even better now. There are no known issues with Diakonos running under Ruby 1.9.1. If you encounter anything, please let me know.
As I move forward with development, I am preferring 1.9 styles and constructions where there is a choice. As such, some functions of Diakonos may no longer function under Ruby 1.8. I encourage you to install Ruby 1.9 if you have not already, and to keep both versions concurrently installed on your systems. The Ruby community benefits when people move forward to adopt and use this latest stable release of Ruby.
A corollary of running under 1.9 is the ability to open and edit files with encodings other than ASCII. The little test files I opened were handled by Diakonos without difficulty. I could insert and delete UTF-8 characters and save the file. Any real world usage (testing) of Diakonos with non-ASCII files is appreciated!
Also, don’t forget that things run faster under Ruby 1.9, and Diakonos is no exception!
Several bugs were fixed (see the git commit log for details). If you subscribed to the particular LinisTrac tickets in question, you would have already been notified.
The rest of the changes are described in this version’s full changelog:
- New installation and uninstallation method: tarball + install.rb.
- Added configuration setting inheritance.
- Added block selection mode (Alt-Shift-M B; Alt-Shift-M N).
- Added line numbering settings.
- Added spawn function.
- Added go_block_previous, go_block_next (Ctrl-PageUp, Ctrl-PageDown).
- Added go_block_outer, go_block_inner (Alt-PageUp, Alt-PageDown).
- “Remove word” functionality (Ctrl-W) added to readline.
- Added find.show_context_after setting.
- Added view.column_markers.
- Added lang.____.indent.not_indented setting.
- Introduced $d shell variable: current buffer’s directory.
- $f and $d now expand to absolute paths.
- delete_to and delete_to_and_from can now operate over multiple lines.
- delete_to_and_from can now delete between matching brackets.
- Added git diff (F9).
- Ruby 1.9 support smoothed out. Ruby 1.8 support being deprecated.
- Support for non-ASCII encodings tentatively confirmed.
- Several bugs fixed.
- Help files updated.
As usual, report any bugs here, or come visit me in IRC. If you like Diakonos, please consider making a small donation.
Enjoy version 0.8.8!
Diakonos - version 0.8.6
Diakonos - version 0.8.7
Diakonos - version 0.8.5
Syndicated 2009-04-03 19:17:26 from Catholicism Computes