Last active
March 30, 2020 03:54
-
-
Save arusu0629/f2429c7eff4dda8d478ca5007970255c to your computer and use it in GitHub Desktop.
~/.emacs.d/init.el
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; init.el | |
;; show line number | |
(require 'linum) | |
(global-linum-mode) | |
;; show and hide line number with F9 | |
(global-set-key [f9] 'linum-mode) | |
;; Language | |
(set-language-environment "Japanese") | |
;; coring system | |
(set-default-coding-systems 'utf-8) | |
(set-keyboard-coding-system 'utf-8) | |
(set-terminal-coding-system 'utf-8) | |
(set-buffer-file-coding-system 'utf-8) | |
(prefer-coding-system 'utf-8) | |
;; main cursor is added underline | |
(setq hl-line-face 'underline) | |
(global-hl-line-mode) | |
(setq linum-format "%3d ") | |
;; don't make backup file | |
(setq make-backup-files nil) | |
(setq auto-save-default nil) | |
;; correspond "()" set to highlight | |
(show-paren-mode t) | |
;; auto indent | |
(setq c-auto-indent t) | |
;; C-x i -> indent | |
(global-set-key (kbd "C-x i") 'indent-region) | |
;; auto put in "()" | |
(electric-pair-mode t) | |
(global-font-lock-mode t) | |
;; set C-h to backspace | |
(global-set-key (kbd "\C-h") 'delete-backward-char) | |
;; Packages | |
(require 'package) | |
;; 初期化 | |
(package-initialize) | |
;; MELPAを追加 | |
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) | |
;; MELPA-stableを追加 | |
(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t) | |
;; Marmaladeを追加 | |
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/") t) | |
;; Orgを追加 | |
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t) | |
;; トラックパッドでスクロールできるように | |
(unless window-system | |
(require 'mouse) | |
(xterm-mouse-mode t) | |
(global-set-key [mouse-4] (lambda () | |
(interactive) | |
(scroll-down 1))) | |
(global-set-key [mouse-5] (lambda () | |
(interactive) | |
(scroll-up 1))) | |
(defun track-mouse (e)) | |
(setq mouse-sel-mode t) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment