Skip to content

Instantly share code, notes, and snippets.

@t-yamamoto-mercury-inc
Created April 6, 2023 08:46
Show Gist options
  • Save t-yamamoto-mercury-inc/7af063b06d3b416326c5ffd149db4b30 to your computer and use it in GitHub Desktop.
Save t-yamamoto-mercury-inc/7af063b06d3b416326c5ffd149db4b30 to your computer and use it in GitHub Desktop.
.emacs
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(add-to-list 'package-archives
'("melpa-stable" . "http://melpa-stable.milkbox.net/packages/") t)
(define-key global-map "\C-a" 'start-kbd-macro)
(define-key global-map "\C-q" 'end-kbd-macro)
(define-key global-map "\C-z" 'call-last-kbd-macro)
(define-key global-map "\C-o" 'beginning-of-buffer)
(define-key global-map "\C-l" 'end-of-buffer)
(put 'upcase-region 'disabled nil)
(column-number-mode 1)
(add-to-list 'auto-mode-alist '("\\.[Cc][Ss][Vv]\\'" . csv-mode))
(autoload 'csv-mode "csv-mode"
"Major mode for editing comma-separated value files." t)
;; バックアップファイルの置き場所を指定する
(setq make-backup-files t)
(setq backup-directory-alist
(cons (cons "\\.*$" (expand-file-name "~/backup"))
backup-directory-alist))
(setq version-control t) ;; 実行の有無
(setq kept-new-versions 10) ;; 最新の保持数
(setq kept-old-versions 1) ;; 最古の保持数
(setq delete-old-versions t) ;; 範囲外を削除
;;; スクロールを1行ずつにする
;; (setq scroll-conservatively 1)
(setq scroll-conservatively 35
scroll-margin 0
scroll-step 1)
(cond
( (or (eq window-system 'ns) (eq window-system 'mac) )
; for cocoa emacs
; 日本語
(set-fontset-font
nil 'japanese-jisx0208
(font-spec :family "Tsukushi A Round Gothic"))
; 半角と全角の比を1:2にしたければ
(setq face-font-rescale-alist
'((".*Tsukushi A Round Gothic.*" . 1.2)))
; ツールバーを消す
(tool-bar-mode 0)
; 背景色設定
(custom-set-faces
'(default ((t (:background "#222222" :foreground "#FFFFFF"))))
'(cursor (
(((class color) (background dark )) (:background "#00AA00"))
(((class color) (background light)) (:background "#999999"))
(t ())
)))
; フレーム透過設定
; (add-to-list 'default-frame-alist '(alpha . (0.9 0.9)))
;起動時のディスプレイサイズ変更
(set-frame-height (next-frame) 60)
(set-frame-width (next-frame) 120)
;;複数ウィンドウを開かないようにする
(setq ns-pop-up-frames nil)
)
)
(put 'downcase-region 'disabled nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment