dot.emacsまとめ

世の中にはすばらしいdot.emacsもありますが、自分用ということで随時更新。


;; .emacs
;; set language
(require ‘un-define)
(set-language-environment “Japanese”)
(set-terminal-coding-system ‘utf-8)
(set-keyboard-coding-system ‘utf-8)
(set-buffer-file-coding-system ‘utf-8)
(setq default-buffer-file-coding-system ‘utf-8)
(setq display-time-24hr-format t)
(setq display-time-day-and-date t)
(setq display-time-string-forms
‘(month “/” day “(” dayname “) ” 24-hours “:” minutes))
(display-time)
(setq load-path (cons “~/.emacs.d” load-path))
;; show line number and column number
(line-number-mode t)
(column-number-mode 1)
;; no backup files
(setq make-backup-files nil)
;; (setq default-major-mode ‘text-mode)
(setq visible-bell t)
(setq ring-bell-function ‘(lambda ()))
(setq transient-mark-mode t)
(setq cursor-in-non-selected-windows nil)
;; (setq default-case-fold-search nil)
(setq-default indent-tabs-mode nil)
(setq-default indicate-empty-lines t)
(setq-default line-spacing 0)
(show-paren-mode t)
;; (setq scroll-preserve-screen-position t)
(setq tab-width 4)
(tool-bar-mode 0)
(menu-bar-mode 0)
;; turn on font-lock mode
(when (fboundp ‘global-font-lock-mode)
(global-font-lock-mode t))
;; default to better frame titles
(setq frame-title-format
(concat “%b – emacs@” system-name))
;;;iswitchb
(iswitchb-default-keybindings)
(defadvice iswitchb-exhibit
(after
iswitchb-exhibit-with-display-buffer
activate)
(when (and
(eq iswitchb-method iswitchb-default-method)
iswitchb-matches)
(select-window (get-buffer-window (cadr (buffer-list))))
(iswitchb-visit-buffer (get-buffer (car iswitchb-matches)))
(select-window (minibuffer-window))))
(add-hook ‘iswitchb-define-mode-map-hook
‘iswitchb-my-keys)
(defun iswitchb-my-keys ()
“Add my keybindings for iswitchb.”
(define-key iswitchb-mode-map [right] ‘iswitchb-next-match)
(define-key iswitchb-mode-map [left] ‘iswitchb-prev-match)
(define-key iswitchb-mode-map “\C-f” ‘iswitchb-next-match)
(define-key iswitchb-mode-map ” ” ‘iswitchb-next-match)
(define-key iswitchb-mode-map “\C-b” ‘iswitchb-prev-match)
)
;;
(setq require-final-newline nil)
(load “php-mode”)
(add-to-list ‘auto-mode-alist ‘(“\\.phpt$” . php-mode))
(add-hook ‘php-mode-hook
(lambda ()
(setq tab-width 4)
(setq c-basic-offset 4)
(setq c-hanging-comment-ender-p nil)))

  1. No comments yet.

  1. No trackbacks yet.