% gem install haml2slim
% ls app/views/emotions 
_form.html.haml edit.html.haml  index.html.haml new.html.haml   show.html.haml
% haml2slim app/views/emotions 
% ls app/views/emotions 
_form.html.haml _form.html.slim edit.html.haml  edit.html.slim  index.html.haml index.html.slim new.html.haml   new.html.slim   show.html.haml  show.html.slim
# app/views/emotions/show.html.slim: 
p#notice= notice
p
  b Body:
  = @emotion.body
p
  b Kind:
  = @emotion.kind
= link_to 'Edit', edit_emotion_path(@emotion)
= link_to 'Back', emotions_path

OMG!

LokkaのテーマにSlim使えるようにしました。index.slimみたいな。

HTMLのescapeがデフォルトだったりして実践で使ってみると予想してたよりHamlとの違いがありますね。

アイコン出来たらMac版をリリースしてlokka.orgにもドキュメント書こうと思います。

ブログをhtml5にする勇気がまだ無い糞野郎です。

Slimのソースを見てみると、!から始まるディレクティブ?にはdoctypeしか無いように見える。とりあえずこんな感じでしのいでいるが・・・。

% slimrb
| <?xml version="1.0" encoding="utf-8" ?>
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<?xml version="1.0" encoding="utf-8" ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

きんもー!

Hamlより過激なSlimを使おうよ。

Sinatra 1.2が待てない野郎もこの通り。

require 'rubygems'
require 'sinatra'
require 'slim'

module Sinatra
  module Templates
    def slim(template, options={}, locals={})
      render :slim, template, options, locals
    end
  end
end

# インデント気になる派には必須の設定
Slim::Engine.set_default_options :pretty => true

get '/' do
  slim :index
end

rails3もslim-rails入れればgeneratorがslim対応。

vimもemacsもsyntaxはextraの中に入ってます。

extra at master from stonean/slim - GitHub

ターミナル — vim — 80×24

まあ、Hamlから%(パーセント)取っただけですわ・・・。