emacs


teratermでudno

KEYBOARD.CNFに以下を追記

[User keys]
; Ctrl + Shift + \ = Control-Underscore
User1=1651,0,$1F

flymake

python

pyflakes をインストール

http

tidy をインストール

C

makefile例

CC       = gcc
TARGET   = test
OBJS     = main.o
INCLUDES = -I./h

$(TARGET): $(OBJS)
	$(CC) -o $@ $(OBJS)

.c.o:
	$(CC) $(INCLUDES) -c $<

clean:
	rm -f $(TARGET) $(OBJS)

check-syntax:
	$(CC) -o null -Wall $(INCLUDES) -S ${CHK_SOURCES}

auctex

apt-get でインストール。

Vine 4.0 の標準設定では、拡張子が .tex のファイルを emacs で開くとやてふが起動するようになっている。これは、Vine 4.0 の標準の .emacs.el で

(setq auto-mode-alist
      (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist))

と書かれているためである。 この設定を上書きしてやれば auctex が動作するようになるので、.emacs.my.el を作成し、

;;; AUCTeX用の設定
;;;(load "auctex.el" nil t t)
(load "tex-site.el" nil t t)
(setq auto-mode-alist
      (cons (cons "\\.tex$" 'japanese-latex-mode) auto-mode-alist))
(setq TeX-default-mode 'japanese-latex-mode)
(setq japanese-TeX-command-default "pTeX")
(setq japanese-LaTeX-command-default "pLaTeX")
(setq japanese-LaTeX-default-style "jsarticle")

と記述。上記の設定で、(load "auctex.el" nil t t) がコメント (;) になっているが、これは、もともとは auctex (現段階で)最新版の ver. 11.84 用の設定をコピーしたため。 Vine 4.0 の auctex は auctex.el を持たないので、ちょっと修正してある。

Emacsから貼り付け

.emacs.my.el に以下の文を追加

(setq x-select-enable-clipboard t)

f90-mode で 起動時に abbrev-mode

.emacs.my.el に以下の文を追加

(setq f90-mode-hook (function (lambda nil (setq abbrev-mode t))))

選択範囲に色を付ける

.emacs.my.el に以下の文を追加

(transient-mark-mode 1)

"yes or no"を"y or n"にする

.emacs.my.el に以下の文を追加

(fset 'yes-or-no-p 'y-or-n-p)

スクロール行数を変える

.emacs.my.el に以下の文を追加

(setq scroll-conservatively 35
  scroll-margin 0
  scroll-step 1) ;1行ずつスクロールする

ツールバーとメニューバーを消す

.emacs.my.el に以下の文を追加

(tool-bar-mode 0)    ;;ツールバーを消す
(menu-bar-mode 0)    ;;メニューバーを消す

.emacs

;;起動時の画面を表示しない
(setq inhibit-startup-message t)

;;; マクロサーチパスの追加
;;; ~/lib/emacs 以下にユーザ用の *.el, *.elc を置くことができます
(setq load-path (append '("~/lib/emacs") load-path))
;(setq load-path (append '("/usr/share/emacs/site-lisp/anthy") load-path))
(setq load-path (append '("/usr/share/emacs/site-lisp/site-start.d") load-path))

;フレームサイズの設定
(setq default-frame-alist
     (append (list '(width . 81)
                   '(height . 60)
              )
              default-frame-alist))

;;Abbrevモード
(let ((file "~/.abbrev_defs"))
  (setq abbrev-file-name file)
  (if (file-exists-p file)
      (quietly-read-abbrev-file file)))
(setq default-abbrev-mode t) ; デフォルトでAbbrevモードにする

(global-set-key "\M- " 'dabbrev-expand)       ; 動的略称展開
(global-set-key "\M-i" 'dabbrev-expand)       ; 動的略称展開
(global-set-key "\M-/" 'expand-abbrev)        ; 静的略称展開
(eval-after-load "abbrev" '(global-set-key "\M-/" 'expand-abbrev))

(add-hook 'pre-command-hook             ; SPC で展開しない
          (lambda ()
            (setq abbrev-mode nil)))

;; (setq auto-mode-alist (append  '(( "\\.h$" . emacs-lisp-mode) ) auto-mode-alist))


(setq default-tab-width 4)

(defun my-c-mode-hook ()
  (c-set-style "k&r")
  (setq c-basic-offset 4)
  (setq default-tab-width 4)
  (setq indent-tabs-mode nil))
(add-hook 'c-mode-hook 'my-c-mode-hook)

(defun my-c++-mode-hook ()
  (c-set-style "k&r")
  (setq c-basic-offset 4)
  (setq indent-tabs-mode nil))
(add-hook 'c++-mode-hook 'my-c++-mode-hook)

(defun my-js-mode-hook ()
  (setq indent-tabs-mode nil))
(add-hook 'js-mode-hook 'my-js-mode-hook)

(defun my-shell-script-mode-hook ()
  (setq tab-width 4)
  (setq indent-tabs-mode nil))
(add-hook 'sh-mode-hook 'my-shell-script-mode-hook)

(defun my-html-mode-hook ()
  (setq tab-width 4)
  (setq indent-tabs-mode nil))
(add-hook 'html-mode-hook 'my-html-mode-hook)



(defun toggle-indent-tabs-mode ()
    "インデントモードをトグル"
    (interactive)
    (if indent-tabs-mode
        (progn
         (setq indent-tabs-mode nil)
         (message "indent-tabs-mode nil"))
        (progn
         (setq indent-tabs-mode t)
         (message "indent-tabs-mode t"))))

;(global-set-key "\C-c\C-t" 'toggle-indent-tabs-mode)
(global-set-key "\C-ct" 'toggle-indent-tabs-mode)


;=======================================================================
;フォント
;=======================================================================

;;(add-to-list 'default-frame-alist
;;	     '(font . "-unknown-VL ゴシック-normal-normal-normal-*-12-*-*-*-*-0-iso10646-1" ) )

;; (create-fontset-from-fontset-spec
;; "-monospace-gothic-medium-r-normal--12-*-*-*-*-*-fontset-shinonome12")

;; (set-default-font "fontset-monospace12")



; 行間設定
;;整数で指定するとピクセル数で、少数で指定すると
;;行の高さに対して相対値で設定されます。
(setq-default line-spacing 1)

;; 色の設定
(if window-system (progn

  ;; 文字の色を設定します。
  (add-to-list 'default-frame-alist '(foreground-color . "white"))
  ;; 背景色を設定します。
  ;; (add-to-list 'default-frame-alist '(background-color . "#333366"))
  ;;(add-to-list 'default-frame-alist '(background-color . "#18074B"))
  (add-to-list 'default-frame-alist '(background-color . "#000022"))
  ;; (add-to-list 'default-frame-alist '(background-color . "#000000"))
;;   ;; カーソルの色を設定します。
;;   (add-to-list 'default-frame-alist '(cursor-color . "white"))
;;   ;; マウスポインタの色を設定します。
;; ;  (add-to-list 'default-frame-alist '(mouse-color . "SlateBlue2"))
;;   ;; モードラインの文字の色を設定します。
;; ;  (set-face-foreground 'modeline "white")
;;   ;; モードラインの背景色を設定します。
;; ;  (set-face-background 'modeline "MediumPurple2")
;;   ;; 選択中のリージョンの色を設定します。
;;   (set-face-background 'region "Blue")
;;   ;; モードライン(アクティブでないバッファ)の文字色を設定します。
;; ;  (set-face-foreground 'mode-line-inactive "gray30")
;;   ;; モードライン(アクティブでないバッファ)の背景色を設定します。
;; ;  (set-face-background 'mode-line-inactive "gray85")

))

;(prefer-coding-system 'utf-8)

;======================================================================
; Anthy
;    CTRL-\で入力モード切替え
;======================================================================
(load-library "anthy")
;(require 'anthy)
;(load-file "/usr/share/emacs/site-lisp/anthy/leim-list.el")
(setq default-input-method 'japanese-anthy)

;C-o で入力モード切り替え
(define-key global-map "\C-o" 'toggle-input-method)

;変換時の文字の色
;(set-face-foreground 'anthy-highlight-face "white")
;(set-face-background 'anthy-highlight-face "blue")
;アンダーライン消去 
;(set-face-underline 'anthy-highlight-face nil)
;(set-face-underline 'anthy-underline-face nil)
;(set-face-background 'anthy-underline-face "blue") 

;======================================================================
; Mozc
;    CTRL-\で入力モード切替え
;======================================================================
;(require 'mozc)
;; or (load-file "/path/to/mozc.el")
(set-language-environment "Japanese")
;(setq default-input-method "japanese-mozc")
(set-default-coding-systems 'utf-8)

;=======================================================================
; auctex
;=======================================================================
;(load "auctex.el" nil t t)
;(load "preview-latex.el" nil t t)
;(setq japanese-LaTeX-command-default "pLaTeX")
;(setq LaTeX-command "platex")
;(setq TeX-default-mode 'japanese-latex-mode)
;(setq japanese-LaTeX-default-style "jsarticle")

;;; TeX src-special の設定
;(setq TeX-source-specials-mode t)

;;; preview-latex の不具合
;(setq TeX-japanese-process-input-coding-system 'euc-jp
;      TeX-japanese-process-output-coding-system 'euc-jp)

;=======================================================================
; Misc
;=======================================================================
(mouse-wheel-mode)                        ;;ホイールマウス
(global-font-lock-mode t)                 ;;文字の色つけ
(setq line-number-mode t)                 ;;カーソルのある行番号を表示
(auto-compression-mode t)                 ;;日本語infoの文字化け防止
(set-scroll-bar-mode 'right)              ;;スクロールバーを右に表示

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ホイールマウス対応
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun up-slightly () (interactive) (scroll-up 5))
(defun down-slightly () (interactive) (scroll-down 5))
(global-set-key [mouse-4] 'down-slightly)
(global-set-key [mouse-5] 'up-slightly)
                     
(defun up-one () (interactive) (scroll-up 1))
(defun down-one () (interactive) (scroll-down 1))
(global-set-key [S-mouse-4] 'down-one)
(global-set-key [S-mouse-5] 'up-one)

(defun up-a-lot () (interactive) (scroll-up))
(defun down-a-lot () (interactive) (scroll-down))
(global-set-key [C-mouse-4] 'down-a-lot)
(global-set-key [C-mouse-5] 'up-a-lot)

;;; 一行が 80 字以上になった時には自動改行する
;; (setq fill-column 80)
;; (setq text-mode-hook 'turn-on-auto-fill)
(setq default-major-mode 'text-mode)

;;; mark 領域に色付け
(setq transient-mark-mode t)

;emacsからコピー
(setq x-select-enable-clipboard t)

;fortran abbrev
(setq f90-mode-hook (function (lambda nil (setq abbrev-mode t))))

;; このファイルに間違いがあった場合に全てを無効にします
(put 'eval-expression 'disabled nil)

;1行ずつスクロールする
(setq scroll-conservatively 35
  scroll-margin 0
  scroll-step 1)

;ツールバーを消す
(tool-bar-mode 0)

;メニューバーを消す
(menu-bar-mode 0)

;"yes or no"を"y or n"にする
(fset 'yes-or-no-p 'y-or-n-p)

;同一ファイル名を開いたときにディレクトリを表示
(require 'uniquify)
(setq uniquify-buffer-name-style 'post-forward-angle-brackets)
(setq uniquify-min-dir-content 1)

;タイトルバーにファイル名とディレクトリ名の表示
(setq frame-title-format "%b")

;window 分割時、画面外に出る文章を折り返す
(setq truncate-partial-width-windows nil)

;置換をリージョン指定可能に
(defadvice query-replace (around ys:qr-region)
  (if (and transient-mark-mode mark-active)
      (save-restriction
        (narrow-to-region (region-beginning) (region-end))
        ad-do-return)
    ad-do-return))
(defadvice query-replace-regexp (around ys:qrr-region)
  (if (and transient-mark-mode mark-active)
      (save-restriction
        (narrow-to-region (region-beginning) (region-end))
        ad-do-return)
    ad-do-return))
(ad-enable-advice 'query-replace 'around 'ys:qr-region)
(ad-enable-advice 'query-replace-regexp 'around 'ys:qrr-region)

; リージョン選択部を検索
(defadvice isearch-mode (around isearch-mode-default-string (forward &optional regexp op-fun recursive-edit word-p) activate)
  (if (and transient-mark-mode mark-active (not (eq (mark) (point))))
      (progn
        (isearch-update-ring (buffer-substring-no-properties (mark) (point)))
        (deactivate-mark)
        ad-do-it
        (if (not forward)
            (isearch-repeat-backward)
          (goto-char (mark))
          (isearch-repeat-forward)))
    ad-do-it))

;yank した文字列をハイライト表示
(when (or window-system (eq emacs-major-version '21))
  (defadvice yank (after ys:highlight-string activate)
    (let ((ol (make-overlay (mark t) (point))))
      (overlay-put ol 'face 'highlight)
      (sit-for 1)
      (delete-overlay ol)))
  (defadvice yank-pop (after ys:highlight-string activate)
    (when (eq last-command 'yank)
      (let ((ol (make-overlay (mark t) (point))))
        (overlay-put ol 'face 'highlight)
        (sit-for 1)
        (delete-overlay ol)))))

; 長い文章の折り返しで物理的に次の行に移動
(global-set-key "\C-p" 'previous-window-line)
(global-set-key "\C-n" 'next-window-line)
(global-set-key [up] 'previous-window-line)
(global-set-key [down] 'next-window-line)
(defun previous-window-line (n)
(interactive "p")
(let ((cur-col (- (current-column)
(save-excursion (vertical-motion 0) (current-column)))))
(vertical-motion (- n))
(move-to-column (+ (current-column) cur-col)))
(run-hooks 'auto-line-hook))

(defun next-window-line (n)
(interactive "p")
(let ((cur-col (- (current-column)
(save-excursion (vertical-motion 0) (current-column)))))
(vertical-motion n)
(move-to-column (+ (current-column) cur-col)))
(run-hooks 'auto-line-hook))

; 対応括弧を強調
(show-paren-mode t)

; リージョンを削除して文字を挿入(英語のみ、削除は可能)
(delete-selection-mode 'supersede)

; shell mode

;; shell-modeで上下で補完したい
(setq shell-mode-hook
      (function (lambda ()
                  (define-key shell-mode-map "\C-p" 'comint-previous-input)
                  (define-key shell-mode-map "\C-n" 'comint-next-input))))

; パスワードを隠す
(add-hook 'comint-output-filter-functions
          'comint-watch-for-password-prompt)

; エスケープシーケンスを処理する
(autoload 'ansi-color-for-comint-mode-on "ansi-color"
          "Set `ansi-color-for-comint-mode' to t." t)
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)


;;; ================================================================
;;; Lines enabling gnuplot-mode

;; move the files gnuplot.el to someplace in your lisp load-path or
;; use a line like
;;  (setq load-path (append (list "/path/to/gnuplot") load-path))

;; these lines enable the use of gnuplot mode
;(autoload 'gnuplot-mode "gnuplot" "gnuplot major mode" t)
;(autoload 'gnuplot-make-buffer "gnuplot" "open a buffer in gnuplot mode" t)

;; this line automatically causes all files with the .gp extension to
;; be loaded into gnuplot mode
;(setq auto-mode-alist (append '(("\\.gp$" . gnuplot-mode)) auto-mode-alist))

;; This line binds the function-9 key so that it opens a buffer into
;; gnuplot mode 
;(global-set-key [(f9)] 'gnuplot-make-buffer)

; バックアップファイル
(setq make-backup-files t)
(setq backup-directory-alist
      (cons (cons "\\.*$" (expand-file-name "~/.emacs.bak"))
            backup-directory-alist))

; 折り返し表示ON/OFF
(defun toggle-truncate-lines ()
  "折り返し表示をトグル動作します."
  (interactive)
  (if truncate-lines
      (setq truncate-lines nil)
    (setq truncate-lines t))
  (recenter))
(global-set-key "\M-o" 'toggle-truncate-lines) ; 折り返し表示ON/OFF

; backward-other-window 
(defun backward-other-window (arg &optional all-frames)
  "Select AEG'th different window on this frame, going backwards.
This is just like calling `other-window' with ARG negated."
  (interactive "p")
  (other-window (- arg) all-frames))
(global-set-key "\C-xp" 'backward-other-window)

; windmove
(global-set-key (kbd "C-c <left>")  'windmove-left)
(global-set-key (kbd "C-c <down>")  'windmove-down)
(global-set-key (kbd "C-c <up>")    'windmove-up)
(global-set-key (kbd "C-c <right>") 'windmove-right)


; enlarge/shrink window
(global-set-key (kbd "C-^")  'enlarge-window)
(global-set-key (kbd "C--")  'shrink-window)
(global-set-key (kbd "C-}")  'enlarge-window-horizontally)
(global-set-key (kbd "C-{")  'shrink-window-horizontally)


;;; visible-bell
(setq visible-bell t)

;;句読点
;; (anthy-load-hiragana-map anthy-alt-char-map)

; Dynamic Macro - キー操作の繰返し検出 & 実行
;(defconst *dmacro-key* "\C-t" "繰返し指定キー")
;(global-set-key *dmacro-key* 'dmacro-exec)
;(autoload 'dmacro-exec "dmacro" nil t)


;; iswitchb

(iswitchb-mode 1) ;;iswitchbモードON

;;C-f, C-b, C-n, C-p で候補を切り替えることができるように。

(add-hook 'iswitchb-define-mode-map-hook

(lambda ()

(define-key iswitchb-mode-map "\C-n" 'iswitchb-next-match)

(define-key iswitchb-mode-map "\C-p" 'iswitchb-prev-match)

(define-key iswitchb-mode-map "\C-f" 'iswitchb-next-match)

(define-key iswitchb-mode-map "\C-b" 'iswitchb-prev-match)))


;=======================================================================
;                                モード
;=======================================================================

;; .h ファイルを c++ モードで開く
;; (setq auto-mode-alist (append '(("\\.h$" . c++-mode)) auto-mode-alist))

;(load-library "php-mode")
;(require 'php-mode)
;(setq auto-mode-alist (append '(("\\.php$" . php-mode)) auto-mode-alist))


(autoload 'gtags-mode "gtags" "" t)
(setq gtags-mode-hook
      '(lambda ()
         (local-set-key "\M-t" 'gtags-find-tag)
         (local-set-key "\M-r" 'gtags-find-rtag)
         (local-set-key "\M-s" 'gtags-find-symbol)
         (local-set-key "\C-t" 'gtags-pop-stack)
         ))
(setq c-macro-prompt-flag t)


;=======================================================================
;                           キーバインド
;=======================================================================

; recenter
(global-set-key "\M-l" 'recenter)

; goto-line
(global-set-key "\C-cg" 'goto-line)

(require 'linum)
(global-set-key "\C-cl" 'linum-mode)


;;; Ctrl-H を前1文字削除に変更
(define-key global-map "\C-h" 'backward-delete-char)

; compile
(global-set-key "\C-cc" 'compile)

; next-error
(global-set-key "\C-ce" 'next-error)

; backward-paragraph
(global-set-key "\M-p" 'backward-paragraph)

; forward-paragraph
(global-set-key "\M-n" 'forward-paragraph)

; end-of-buffer
;(global-set-key (kbd "C->") 'end-of-buffer)

; beginning-of-buffer
;(global-set-key (kbd "C-<") 'beginning-of-buffer)


;; pov-ray
;(autoload 'pov-mode "pov-mode.el" "PoVray scene file mode" t)
;(setq auto-mode-alist
;	(append '(("\\.pov$" . pov-mode) 
;		  ("\\.inc$" . pov-mode)
;                 ) auto-mode-alist))

(put 'downcase-region 'disabled nil)
(put 'upcase-region 'disabled nil)

; flymake mode
(global-set-key "\M-n" 'forward-paragraph)

;;; リージョンを削除できるように
(delete-selection-mode t)


;=======================================================================
;                                flymake
;=======================================================================

(require 'flymake)

(global-set-key "\C-cf" 'flymake-mode)


;;(add-hook 'c-mode-hook
;;          '(lambda ()
;;             (flymake-mode t)))

;; (add-hook 'c++-mode-hook
;;           '(lambda ()
;;              (flymake-mode t)))

(add-hook 'python-mode-hook
          '(lambda ()
             (flymake-mode t)))

(add-hook 'ruby-mode-hook
          '(lambda ()
             (flymake-mode t)))

(add-hook 'sh-mode-hook
          '(lambda ()
             (flymake-mode t)))


(defun flymake-display-err-minibuf () 
  "Displays the error/warning for the current line in the minibuffer"
  (interactive)
  (let* ((line-no             (flymake-current-line-no))
         (line-err-info-list  (nth 0 (flymake-find-err-info flymake-err-info line-no)))
         (count               (length line-err-info-list))
         )
    (while (> count 0)
      (when line-err-info-list
        (let* ((file       (flymake-ler-file (nth (1- count) line-err-info-list)))
               (full-file  (flymake-ler-full-file (nth (1- count) line-err-info-list)))
               (text (flymake-ler-text (nth (1- count) line-err-info-list)))
               (line       (flymake-ler-line (nth (1- count) line-err-info-list))))
          (message "[%s] %s" line text)
          )
        )
      (setq count (1- count)))))

(global-set-key "\C-cd" 'flymake-display-err-minibuf)
(global-set-key "\C-cc" 'flymake-start-syntax-check)
(global-set-key "\C-cn" 'flymake-goto-next-error)
(global-set-key "\C-cp" 'flymake-goto-prev-error)

(setq flymake-err-line-patterns
 (cons
  '("\\(.+\\):\\([0-9]+\\):\\([0-9]+\\): \\(.+\\)" 1 2 3 4)
  flymake-err-line-patterns))

;; (add-hook 'c-mode-hook
;; 	  '(lambda ()
;; 	     (define-key c-mode-map "\C-cd" 'flymake-display-err-minibuf)))


(defun flymake-python-init ()
  (let* ((temp-file (flymake-init-create-temp-buffer-copy
                     'flymake-create-temp-inplace))
         (local-file (file-relative-name
                      temp-file
                      (file-name-directory buffer-file-name))))
    (list (concat (getenv "HOME") "/.pyenv/shims/pyflakes") (list local-file))))
;    (list "pyflakes" (list local-file))))
 
(defconst flymake-allowed-python-file-name-masks '(("\\.py$" flymake-python-init)))
(defvar flymake-python-err-line-patterns '(("\\(.*\\):\\([0-9]+\\):\\(.*\\)" 1 2 nil 3)))

 
(defun flymake-python-load ()
  (interactive)
  (defadvice flymake-post-syntax-check (before flymake-force-check-was-interrupted)
    (setq flymake-check-was-interrupted t))
  (ad-activate 'flymake-post-syntax-check)
  (setq flymake-allowed-file-name-masks (append flymake-allowed-file-name-masks flymake-allowed-python-file-name-masks))
  (setq flymake-err-line-patterns flymake-python-err-line-patterns)
  (flymake-mode t))
(add-hook 'python-mode-hook '(lambda () (flymake-python-load)))


(defun flymake-ruby-init ()
  (let* ((temp-file   (flymake-init-create-temp-buffer-copy
                       'flymake-create-temp-inplace))
         (local-file  (file-relative-name
                       temp-file
                       (file-name-directory buffer-file-name))))
    (list "ruby" (list "-c" local-file))))
(push '(".+\\.rb$" flymake-ruby-init) flymake-allowed-file-name-masks)
(push '("Rakefile$" flymake-ruby-init) flymake-allowed-file-name-masks)
(defvar flymake-ruby-err-line-patterns '(("^\\(.*\\):\\([0-9]+\\): \\(.*\\)$" 1 2 nil 3)))
;; (push '("^\\(.*\\):\\([0-9]+\\): \\(.*\\)$" 1 2 nil 3) flymake-err-line-patterns)


(require 'cedet)


(require 'doxymacs)




;; vcを起動しないようにする
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(show-paren-mode t)
 '(tool-bar-mode nil)
 '(vc-handled-backends nil))

;; 不要なhookを外す
(remove-hook 'find-file-hook 'vc-find-file-hook)
(remove-hook 'kill-buffer-hook 'vc-kill-buffer-hook)



(progn
  (require 'whitespace)
  (setq whitespace-style
        '(
          face ; faceで可視化
          trailing ; 行末
          tabs ; タブ
;          spaces ; スペース
          space-mark ; 表示のマッピング
          tab-mark
          ))
  (setq whitespace-display-mappings
        '(
;          (space-mark ?\u3000 [?\u3000])
          (tab-mark ?\t [?\u00BB ?\t] [?\\ ?\t])
          ))
;  (setq whitespace-display-mappings
;        '(
;          (space-mark ?\u3000 [?\u2423])
;          (tab-mark ?\t [?\u00BB ?\t] [?\\ ?\t])
;          ))
  (setq whitespace-trailing-regexp  "\\([ \u00A0]+\\)$")
;  (setq whitespace-space-regexp "\\(\u3000+\\)")
  (set-face-attribute 'whitespace-trailing nil
                      :foreground "#000044"
                      :background "#000044"
                      :underline nil)
  (set-face-attribute 'whitespace-tab nil
                      :foreground "#000044"
                      :background "#000044"
                      :underline nil)
  (set-face-attribute 'whitespace-space nil
                      :foreground "gray40"
                      :background "gray20"
                      :underline nil)
  (global-whitespace-mode t)
  (global-set-key "\C-cw" 'whitespace-mode)
  )


(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(default ((t (:family "Ricty" :foundry "PfEd" :slant normal :weight normal :height 97 :width normal)))))

checkinstall

/usr/local/sbin/checkinstall --exclude=/selinux

最新の20件

2021-03-31 2020-06-09 2020-05-30 2019-12-02 2018-10-18
  • emacs
2018-07-05 2018-01-11 2015-12-07 2015-08-03 2015-07-20 2012-07-19 2012-06-30 2012-06-23 2012-01-25 2011-11-09 2011-11-08 2011-10-02

今日の18件

  • counter: 334
  • today: 2
  • yesterday: 0
  • online: 1