Emacs †テキストエディタ Emacs関係のTipsを書いておくページ
レジスタに文字列を設定しておく †
(set-register ?A "always @(posedge clk, posedge reset) begin\n ....") ファイルのエンコーディングを指定して読み込む †C-x RET c (universal-coding-system-argument) でコードを指定してから C-x C-f (find-file) する。 perldocを参照する †M-x cperl-perldoc completion時に大文字/小文字を区別しない †(setq completion-ignore-case t) (setq read-file-name-completion-ignore-case t) % ファイル名の場合 (setq read-buffer-completion-ignore-case t) 画面についた色を消す/付ける †M-x global-font-lock-mode 日付を挿入 †(defun insert-date () (interactive) (insert (format-time-string "%Y/%m/%d(%a)"))) (global-set-key "\C-c\C-d" 'insert-date) ファイルで emacsの変数を指定する方法 †emacsのinfoのFile Variablesというページに書いてありました。
;; -*- mode: Lisp; fill-column: 75; comment-column: 50; -*-
;;; Local Variables: *** ;;; mode:lisp *** ;;; comment-column:0 *** ;;; comment-start: ";;; " *** ;;; comment-end:"***" *** ;;; End: *** c++のソースにはこんなのを入れると便利かも /*** Local Variables: ***/ /*** tab-width: 4 ***/ /*** c-basic-offset:4 ***/ /*** End: ***/ 画像ファイルを見る †.emacsに (auto-image-file-mode) と書いておけば c-x c-f で開くだけで画像ファイルが表示される。 圧縮されたファイルを開く †(auto-compression-mode) .emacsの例 †(set-language-environment "Japanese") (prefer-coding-system 'utf-8-unix) (set-terminal-coding-system 'utf-8) (global-set-key "\C-O" 'toggle-input-method) (setq default-process-coding-system '(utf-8 . utf-8)) (setq completion-ignore-case t) (setq mode-line-inverse-video t) (setq make-backup-files nil) (setq kept-old-versions 0) (setq kept-new-versions 0) (setq visible-bell t) (setq default-truncate-lines t) (global-set-key "\eg" 'goto-line) (global-set-key "\^x\^n" 'next-error) (global-set-key "\C-m" 'newline-and-indent) (global-set-key "\^c\^c" 'compile) (global-set-key "\^xx" 'copy-to-register) (global-set-key "\^xg" 'insert-register) (global-set-key "\^x\^o" 'switch-to-buffer-other-window) (defun set-compile-command () (local-set-key "\C-c\C-c" 'compile)) (add-hook 'c-mode-hook 'set-compile-command) (add-hook 'makefile-mode-hook 'set-compile-command) (add-hook 'shell-mode-hook 'set-compile-command) cygwin-mount †(require 'cygwin-mount) (cygwin-mount-activate) 選択範囲に色をつけない †(setq transient-mark-mode nil) ntemacs 設定情報: † |