From: Michael Neumann Date: 2008-05-10T06:36:51+09:00 Subject: Re: lambda, ->, haskell, and so on Phil Hagelberg wrote: > "E S" writes: > >> How about we just move to UTF-8 source files and >> use the actual lambda character instead of arguing >> weeks on end about which ASCII representation is >> least unlike the lambda character? > > Actually, you can do this with an alias already for regular lambdas. But > it would be great if that alias were set up for you automatically. > > I've already set up Emacs to render the string "lambda" as �� and have > bound C-c l to insert it. It's just a matter of getting proper tool > support. =) > > -Phil > > > > (add-hook 'ruby-mode-hook > (lambda () > (font-lock-add-keywords > nil `(("(?\\(lambda\\>\\)" > (0 (progn (compose-region (match-beginning 1) (match-end 1) > ,(make-char 'greek-iso8859-7 107)) > nil)))))) > > (define-key ruby-mode-map (kbd "C-c l") (lambda () (interactive) (insert "lambda"))) Anyone having a vim equivalent? :) Regards, Michael