Emacs rails 0.39

Testing version of Emacs Rails
(http://rubyforge.org/projects/emacs-rails/)
was released. If you have some suggestion or you find some bugs please
inform us.

Features:

  • Management of WEBrick/Mongrel
  • Display color log file
  • Toggle Switch between Action/View and other file (tests, helpers)
    automaticly or with menu
  • Switching to file from current line f.e. from redirect_to :controller
    =>
    “foo”, :action => “bar”, swtich to this controller/action
  • TextMate-like snippets (snippets.el)
  • ERb refactoring (create partial from selection, create helper from
    block)
  • Automatic TAGS generation in RAILS_ROOT directory
  • Quick access to the main configuration files
  • Documentation search using ri or chm file and Rails API reference in
    HTML
  • Quick start svn-status in RAILS_ROOT
  • Integration with script/generate script/destroy (controller, model,
    scaffold, migration)
  • Goto menus for quick access to controllers, models, and other.
  • Auto-determination of current rails DB settings and running SQL
    console
  • Automatic openning browser on current action (from view or controller)
  • Integration with interactive scripts script/console and
    script/breakpointer
  • Fast navigation in Rails root hierarchy (rails finds - C-c f )
  • Fast running of rails rake with autocomplete

and some other.

Also you can find some non-completed review of Emacs Rails in
http://rubyforge.org/docman/?group_id=1484.

May you post your .emacs file, please?

Thanks in advance,

  • Dunnil

This is a piece of code from my emacs configuration file for RoR:

;;;;;;;;;;;;;;;;;;;; Rails ;;;;;;;;;;;;;;;;;;;;

(add-to-list 'load-path “/home/cp/proj/emacs-rails/trunk/”)

(defun try-complete-abbrev (old)
(if (expand-abbrev) t nil))

(setq hippie-expand-try-functions-list
'(try-complete-abbrev
try-complete-file-name
try-expand-dabbrev))

(require 'rails)
(setf rails-api-root “/home/cp/doc/programming/ruby/rails/doc/api/”)

(defun rails-find-and-goto-error ()
"Finds error in rails html log ang go to file/line with error "
(interactive)
(search-forward-regexp “RAILS_ROOT: \([^<]\)")
(let ((rails-root (concat (match-string 1) “/”)))
(search-forward “id=“Application-Trace””)
(search-forward “RAILS_ROOT}”)
(search-forward-regexp "\([^:]
\):\([0-9]+\)”)
(let ((file (match-string 1))
(line (match-string 2)))
(kill-buffer (current-buffer))
(message
(format "Error finded in file “%s” on %s line. " file line))
(find-file (concat rails-root file))
(goto-line (string-to-int line)))))

(setf rails-find-file-function 'ido-find-file)

(setf rails-use-text-menu nil)
(GNUEmacs
(modify-coding-system-alist 'file “\.rhtml$” 'utf-8)
(modify-coding-system-alist 'file “\.rb$” 'utf-8))
(setf rails-tags-command “ctags-exuberant -e -a --Ruby-kinds=-f -o %s
-R
%s”)
(defadvice browse-url (before switch-to-firefox
activate compile)
“Switch to firefox after openning a URL”
(shell-command "FvwmCommand “GoToDesk 0 2"”))

(require 'mmm-mode)
(require 'mmm-auto)
(setq mmm-global-mode 'maybe)
(setq mmm-submode-decoration-level 2)
(set-face-background 'mmm-output-submode-face “#080012”)
(set-face-background 'mmm-code-submode-face “Black”)
;; (set-face-background 'mmm-comment-submode-face “DarkOliveGreen”)
(mmm-add-classes
'((erb-code
:submode ruby-mode
:match-face (("<%#" . mmm-comment-submode-face)
("<%=" . mmm-output-submode-face)
("<%" . mmm-code-submode-face))
:front “<%[#=]?”
:back “%>”
:insert ((?% erb-code nil @ “<%” @ " " _ " " @ “%>” @)
(?# erb-comment nil @ “<%#” @ " " _ " " @ “%>” @)
(?= erb-expression nil @ “<%=” @ " " _ " " @ “%>” @)))))

(add-hook 'html-mode-hook
(lambda ()
(local-set-key (kbd “”) 'mmm-parse-buffer)
(setq mmm-classes '(erb-code))
(mmm-mode)))

2006/4/20, Human D. [email protected]:

2006/4/20, Calle D. [email protected]:

  • Please fix your tar.gz file so it doesn’t expand to the current
    directory, but to a subdir.
  • It would be nice if the README file was readable with “more” from

the command line (I see nothing in it that doesn’t fit in plain old
ASCII).

OK, i fix that.

  • All key combinations of the form C-c are reserved for the

user and should not be used by major or minor modes. Se the GNU
Emacs Lisp Reference Manual, Appendix D, section 1, point 10. You
break this rather a lot in rails-ui.el

I was not knew this… This task now in TODO.

“Rezikov” == Rezikov P. [email protected] writes:

Testing version of Emacs Rails (http://rubyforge.org/projects/emacs-rails/)
was released. If you have some suggestion or you find some bugs please
inform us.

  • Please fix your tar.gz file so it doesn’t expand to the current
    directory, but to a subdir.

  • It would be nice if the README file was readable with “more” from
    the command line (I see nothing in it that doesn’t fit in plain old
    ASCII).

  • All key combinations of the form C-c are reserved for the
    user and should not be used by major or minor modes. Se the GNU
    Emacs Lisp Reference Manual, Appendix D, section 1, point 10. You
    break this rather a lot in rails-ui.el

    Calle D. [email protected]
    http://www.livejournal.com/users/cdybedahl/
    “You know, if I garbage collected my brain I wouldn’t have anything
    left.”
    – Paul Tomblin, BofhNet

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs