Hi Dima! Big improvements, we’re super close.
re: syntax highlighting
If I comment out the following line in rails-minor-mode:
;******** uncomment and this breaks highlighting
; (visit-tags-table tags-file-name t)
Then syntax coloring starts to work again. Now I don’t have a TAGS
file setup, so perhaps the function is failing and causing the rest of
the hooks not to run? I’m groking elisp a little now, but not enough.
re: TAB key
I’ve removed ECB and just about everything else in my .emacs file.
binding to still doesn’t work, but I can bind to and that
does work.
Here’s what’s left of my .emacs:
;;----------------------------------------------------------------------------
;; Set up syntax highlighting (font-lock)
;;----------------------------------------------------------------------------
(cond ((fboundp 'global-font-lock-mode)
;; Turn on font-lock in all modes that support it
(global-font-lock-mode t)
;; Maximum colors
(setq font-lock-maximum-decoration t)))
(setq ruby-program-name “/usr/local/bin/ruby”)
(autoload 'ruby-mode “ruby-mode” “Mode for editing ruby source files”)
(add-to-list 'auto-mode-alist '(".rb$" . ruby-mode))
(add-to-list 'auto-mode-alist '(".rjs$" . ruby-mode))
(add-to-list 'interpreter-mode-alist '(“ruby” . ruby-mode))
(require 'ruby-electric)
(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)
(add-hook 'ruby-mode-hook
(lambda()
(ruby-electric-mode t)
))
That’s it… nothing else (removed ECB, etc)
Note: ruby-mode.el and ruby-electric.el are the latest from CVS
CVS HEAD emacs running in text mode under ssh/putty & screen.
Summary:
Broken Stuff:
- No TAB key
- (visit-tags-table) seems to be breaking font-lock
thoughts?
Good stuff:
- abbrevs, snippet replace mode, Ctrl-T and everything else seem to work
great.
rails.el rocks! This completely demotivates me from buying a MacBook
Thanks,
-San