Skip to content

Instantly share code, notes, and snippets.

(global-set-key (kbd "{") (smartchr '("{" "{$`!!'}" "{{")))
--- anything-config.el.orig 2010-04-03 16:00:36.000000000 +0900
+++ anything-config.el 2010-04-03 16:18:15.000000000 +0900
@@ -4713,6 +4713,12 @@
(defun anything-find-file-as-root (candidate)
(find-file (concat "/" anything-su-or-sudo "::" (expand-file-name candidate))))
+(defun anything-find-files (candidate)
+ (anything-aif (anything-marked-candidates)
+ (dolist (i it)
+ (find-file i))
(let ((point (point-min)))
(goto-char (point-min))
(end-of-line)
(message (buffer-substring point (point))))
;; 元ネタ
;; -気軽にマクロ展開/ポロポロ http://d.hatena.ne.jp/kitokitoki/20100225/p1
;; 「qで出力バッファを削除」という課題に取り組んだがいまいちだった。
;; そのうち再挑戦する。
;; これでは,"*Pp Macroexpand Output*" をqせずに別のバッファに行ってはいけない。
(unless (fboundp 'pp-macroexpand-last-sexp)
(defun pp-macroexpand-last-sexp (arg)
(interactive "P")
(if arg
// ==UserScript==
// @name Test
// @description Test
// @namespace http://d.hatena.ne.jp/kitokitoki/
// @include *
// ==/UserScript==
(function(){
var elt = document.createElement('div');
with(elt.style){
position = 'fixed'; //スクロールに追随
abbrev--active-tables
abbrev--before-point
abbrev--check-chars
abbrev--describe
abbrev--write
abbrev-get
abbrev-insert
abbrev-put
abbrev-table-get
abbrev-table-menu
bold-region
browse-url-lynx-emacs
browse-url-lynx-xterm
Buffer-menu-revert
charset-quoted-standard-p
codepage-setup
coding-system-flags
coding-system-spec
cp-charset-for-codepage
cp-language-for-codepage
<?php
$last_day = date("t", mktime(0, 0, 0, $month, 1, $year));
;; http://d.hatena.ne.jp/l1o0/20100521/1274455933 のオレオレ版です。
(defun my-forward-word (arg)
(interactive "p")
(cond
((region-active-p) (forward-word arg))
((looking-at ".$") (re-search-forward "\\W\\b\\"))
((looking-at "\\cj") (forward-word arg))
((looking-at "\\(。\\|、\\|.\\|,\\)") (re-search-forward "\[。、.,\]+"))
(t (re-search-forward "\\(.$\\|\\W\\b\\)"))))