|
From: | Dmitry Gutov |
Subject: | Re: Small improvements to ruby-mode |
Date: | Sat, 22 Jun 2013 17:28:26 +0400 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 |
On 22.06.2013 11:05, Bozhidar Batsov wrote:
Should we add more, e.g. include, attr_accessor, using, refine?Yes, I think we should definitely add more. The ones you listed - for sure. We should also add fail (it's a synonym for raise), extend, etc. Btw catch is also a method, not a keyword. loop should also be on the second list, as should be proc and lambda IMO.
Ok, also done (except for etc :)), together with other attr* methods, and define_method.
I'd also suggest adding the "command-like" methods for Kernel that are usually used without an explicit receiver everywhere. There's not that many such commands: abort at_exit eval exec exit exit! fail fork format p print printf putc puts rand sleep spawn sprintf srand syscall system trap warn
I'm less sure about these. Every method on Kernel is usually called without an explicit receiver, and there are more of them.
Let's wait for another opinion.
I'm not so sure about re-implementing it, though. It's easy enough to install in its current form, no?Sure - my point is that not all Emacs users would know about the package. I'd venture a guess saying most of them won't. The functionality in it seems a perfect fit for ruby-mode. Even if it has to be reimplemented - we're talking about a only a handful of not particularly complex commands.
Patches welcome. :) Personally, I haven't found myself using ruby-tools too often:1) I don't subscribe to your principle of single quotes vs. double quotes. So, when I'm adding an interpolation to a string, it's usually double-quoted already.
2) Automatic insertion of curly braces after "#" in strings is annoying when you're actually trying to type "#", for example when writing a method signature. I also disagree with "don't leave out {} around instance and global variables".
But as optional commands with less invasive bindings ("C-c #"?), they would be fine.
[Prev in Thread] | Current Thread | [Next in Thread] |