Skip to content

Instantly share code, notes, and snippets.

@ssugiyama
Last active May 30, 2017 16:02
Show Gist options
  • Save ssugiyama/613b3243baf259c4a574 to your computer and use it in GitHub Desktop.
Save ssugiyama/613b3243baf259c4a574 to your computer and use it in GitHub Desktop.
;; 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)
;(when load-file-name
; (setq user-emacs-directory (file-name-directory load-file-name)))
(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-refresh-contents)
(package-install 'auto-complete)
(package-install 'helm)
(package-install 'ess)
(package-install 'web-mode)
(package-install 'migemo)
(package-install 'magit)
(package-install 'helm-swoop)
(package-install 'helm-ag)
(package-install 'markdown-mode)
(package-install 'flycheck)
(package-install 'yaml-mode)
(package-install 'go-mode)
(package-install 'go-autocomplete)
(package-install 'yasnippet)
(package-install 'auto-yasnippet)
(setq indent-tabs-mode nil)
;;; マウスでぬるぬる
(setq mouse-drag-copy-region t)
;;;font設定
(set-face-attribute 'default nil :family "Ricty" :height 140)
;;; デフォルトwindow設定
(setq default-frame-alist '((width . 100)
(height . 40)
(alpha . 85)))
;;;日本語環境
(set-language-environment 'Japanese)
(prefer-coding-system 'utf-8)
(setq default-input-method "MacOSX")
(add-hook 'minibuffer-setup-hook 'mac-change-language-to-us)
;;;キー設定
(when (eq system-type 'darwin)
(setq ns-command-modifier (quote meta))
(setq ns-option-modifier nil)
(global-set-key (kbd "M-RET") 'toggle-frame-fullscreen))
(add-to-list 'exec-path "/usr/local/bin")
(add-to-list 'exec-path (expand-file-name "~/.go/bin"))
;;; customize
(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.
'(ag-executable "/usr/local/bin/ag")
'(custom-enabled-themes (quote (leuven)))
'(custom-safe-themes
(quote
("c712d616ea5a9ef4e513681846eb908728bbb087c2d251ded8374ee9faafa199" default)))
'(package-selected-packages (quote (let-alist helm ess auto-complete auto-compile ag))))
(setq use-dialog-box nil)
(require 'uniquify)
(setq uniquify-buffer-name-style 'post-forward)
;;; hekm
(require 'helm-config)
(helm-mode 1)
(define-key helm-find-files-map (kbd "TAB") 'helm-execute-persistent-action)
(define-key helm-read-file-map (kbd "TAB") 'helm-execute-persistent-action)
(global-set-key (kbd "C-;") 'helm-mini)
(define-key isearch-mode-map (kbd "M-o") 'helm-swoop-from-isearch)
(global-set-key (kbd "M-s o") 'helm-swoop)
;;; auto complete
(ac-config-default)
(global-auto-complete-mode t)
(setq ac-auto-start 1)
(require 'go-autocomplete)
;;; flycheck
(add-hook 'after-init-hook #'global-flycheck-mode)
;;; markdown
(setq markdown-command "/usr/local/bin/multimarkdown")
;;; web-mode
(add-to-list 'auto-mode-alist '("\\.\(php\|tpl\|erb\|html?\|ejs\|js\|jsx\|s[ac]ss\|css\)$" . web-mode))
(add-hook 'web-mode-hook '(lambda ()
(setq web-mode-markup-indent-offset 4)
))
(setq web-mode-content-types-alist
'(("jsx" . "\\.js[x]?\\'")))
(yas-global-mode 1)
;(add-hook 'before-save-hook 'delete-trailing-whitespace)
(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.
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment