Skip to content

Instantly share code, notes, and snippets.

@tado
Created April 6, 2016 18:06
Show Gist options
  • Save tado/602b6e95f7c021e9bb64c4d4eea1b8e3 to your computer and use it in GitHub Desktop.
Save tado/602b6e95f7c021e9bb64c4d4eea1b8e3 to your computer and use it in GitHub Desktop.
init.el for Emacs on Windows 10
;; package
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)
;; basic settings
(set-language-environment 'utf-8)
(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-keyboard-coding-system 'utf-8)
(tool-bar-mode 0)
(menu-bar-mode 0)
(scroll-bar-mode 0)
(show-paren-mode t)
(setq-default line-spacing 3)
(add-to-list 'default-frame-alist '(alpha . 85))
(setq make-backup-files nil)
(setq auto-save-default nil)
;;theme
(load-theme 'manoj-dark t)
;;font
(set-face-attribute 'default nil :family "Consolas" :height 120)
(set-fontset-font nil 'japanese-jisx0208 (font-spec :family "Meiryo"))
(setq face-font-rescale-alist '(("Meiryo" . 0.85)))
;;cursor
(setq-default cursor-type '(bar . 3))
;; auto-complete
(require 'auto-complete)
(require 'auto-complete-config)
(global-auto-complete-mode t)
;;C++
(defun my-c-c++-mode-init () (setq c-basic-offset 4))
(add-hook 'c-mode-hook 'my-c-c++-mode-init)
(add-hook 'c++-mode-hook 'my-c-c++-mode-init)
;; markdown
(autoload 'markdown-mode "markdown-mode"
"Major mode for editing Markdown files" t)
(add-to-list 'auto-mode-alist '("\\.text\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment