Skip to content

Instantly share code, notes, and snippets.

@guehara
guehara / gist:3445212
Created August 24, 2012 03:40
minor-mode-alistから長すぎるのを削る
; abbrevとか長すぎる
(setcar (cdr (assq 'abbrev-mode minor-mode-alist)) " Ab")
; Flymakeも短く
(add-hook 'flymake-mode-hook
(lambda ()
(setcar (cdr (assq 'flymake-mode minor-mode-alist)) " Fly")))
@guehara
guehara / gist:3445213
Created August 24, 2012 03:41
日付表示の方法をよく忘れるのでメモ
(setq display-time-string-forms
'(year "/" month "/" day " " dayname " " 24-hours ":" minutes))
(display-time)
@guehara
guehara / gist:3445183
Created August 24, 2012 03:35
Makefile for Flymake - iOS5.1 with ARC
CLANG = /usr/bin/clang
ARCH = -arch armv7
SDK = -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
OS_VER_MIN = -miphoneos-version-min=5.1
OPTIONS = -fsyntax-only -fblocks -fobjc-arc -x objective-c -std=gnu99
WARNINGS = -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value
INCLUDES = -I. -include ./*.pch
FRAMEWORKS = -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks
check-syntax:
@guehara
guehara / gist:3400327
Created August 20, 2012 03:38
melpha friendly style for stylish
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url("http://melpa.milkbox.net/") {
body {
background-color: #555 !important;
}
h1 {
color: #FA8 !important;
}
tr.header {
@guehara
guehara / gist:2692728
Created May 14, 2012 08:33
linum-mode で行数に応じて幅を調整
;; linum
(require 'linum)
(setq linum-format
(lambda (line) (propertize (format (let ((w (length (number-to-string (count-lines (point-min) (point-max)))))) (concat "%" (number-to-string w) "d")) line) 'face 'linum)))
(global-linum-mode t)
@guehara
guehara / gist:2692710
Created May 14, 2012 08:30
anything-rurima ドキュメントのバッファが文字化けする対策
;;; anything-rurima
(require 'anything-rurima)
(setq anything-rurima-index-file "~/dev/ruby/svn/rubydoc/rurima.e")
(modify-coding-system-alist 'file "\\/dev\\/ruby\\/svn\\/rubydoc*" 'euc-jp)
@guehara
guehara / gist:2692751
Created May 14, 2012 08:36
rails+rvm環境でTAGSファイル作成
#!/bin/sh
find . -name "*.rb" | xargs etags --language=none --regex='/[ \t]*\(def\|class\|module\)[ \t]\([^ \t]+\)/\2/'
find ~/.rvm/rubies/default/lib/ruby -name "*.rb" | xargs etags -a --language=none --regex='/[ \t]*\(def\|class\|module\)[ \t]\([^ \t]+\)/\2/'
@guehara
guehara / gist:2692718
Created May 14, 2012 08:31
vc-mode を完全にOFFる
(setq vc-handled-backends ())
@guehara
guehara / ruby-block.diff
Created May 7, 2012 03:31
ruby-block-mode diff
ruby-mode-hook にいちいち追加すんのが面倒なので本体側を修正。
original -> 【EmacsWiki: Ruby Block Mode】 http://www.emacswiki.org/emacs/RubyBlockMode
@guehara
guehara / current-string-to.el.diff
Last active October 3, 2015 08:28
current-string-to.el でドットも delimiter に追加
--- current-string-to.el.orig 2015-01-14 15:01:56.000000000 +0900
+++ current-string-to.el 2015-01-14 15:04:33.000000000 +0900
@@ -65,11 +65,11 @@
(defvar current-string-to-delimiter-regexp-ascii
- "[\][\t\(\)\"\|\\ /`',;:<>{}「」=]"
+ "[\][\t\(\)\"\|\\ /`'\.,;:<>{}「」=]"
"A regular expressions to search ascii delimiters.")