[表示 : 全て 最新50 1-99 101- 201- 301- 401- 501- 601- 701- 801- 901- 2chのread.cgiへ]
Update time : 04/03 02:06 / Filesize : 277 KB / Number-of Response : 955
[このスレッドの書き込みを削除する]
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧] [類似スレッド一覧]


↑キャッシュ検索、類似スレ動作を修正しました、ご迷惑をお掛けしました

【叩かれて】Emacs Lisp道場【強くなれ】



19 名前:newbie mailto:sage [03/09/21 20:34]
XHTMLだと原則終了タグも書かなきゃならないので、タグ書きがめ
んどう。そこで、ミニバッファでタグの要素を打ち込んでカーソ
ル位置にタグを挿入するかんたんなS式

;; insert-htmltag
(defun insert-htmltag (str)
"Insert a pair of HTML tags.
Insert a pair of HTML tags read from
mini buffer at the cursor point."
(interactive "sInput tag: ")
(let ((elm (car (split-string str))))
(if (stringp elm)
(progn (insert "<"str"></"elm">")
(forward-char (- (+ 3 (length elm))))))))

(setq html-helper-mode-hook
'(lambda ()
(define-key html-helper-mode-map "\C-ct" 'insert-htmltag)))

たとえば、ミニバッファで
div class="hoge" と入力すると
<div class="hoge"></div> とカレントバッファに挿入され、カー
ソルもタグのあいだに移動ずみです。

HTML-helper-mode のキーバインドを覚えきらないんで(^_^;)







[ 続きを読む ] / [ 携帯版 ]

全部読む 次100 最新50 [ このスレをブックマーク! 携帯に送る ] 2chのread.cgiへ
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧]( ´∀`)<277KB

read.cgi ver5.27 [feat.BBS2 +1.6] / e.0.2 (02/09/03) / eucaly.net products.
担当:undef