Last active
June 1, 2019 01:55
-
-
Save takuto-h/5575260 to your computer and use it in GitHub Desktop.
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
(setq make-backup-files nil) | |
(setq-default indent-tabs-mode nil) | |
(setq-default show-trailing-whitespace t) | |
(add-hook 'find-file-hooks | |
'(lambda () | |
(setq mode-line-buffer-identification 'buffer-file-truename))) | |
(global-set-key "\C-m" 'newline-and-indent) | |
(global-set-key "\C-j" 'newline) | |
(global-set-key "\C-cq" 'query-replace) | |
(global-set-key "\C-cQ" 'query-replace-regexp) | |
(global-set-key "\C-cr" 'replace-string) | |
(require 'package) | |
(add-to-list 'package-archives | |
'("melpa" . "http://melpa.milkbox.net/packages/") t) | |
(package-initialize) | |
(add-to-list 'auto-mode-alist '("\\.t$" . perl-mode)) | |
(add-to-list 'auto-mode-alist '("\\.inc$" . html-mode)) | |
(add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode)) | |
(add-to-list 'auto-mode-alist '("\\.vue$" . web-mode)) | |
(add-to-list 'auto-mode-alist '("\\.blade\\.php\\'" . web-mode)) | |
(add-hook | |
'c-mode-hook | |
'(lambda () | |
(setq c-basic-offset 4) | |
(c-set-offset 'arglist-intro '+) | |
(c-set-offset 'arglist-close 0) | |
(gtags-mode 1) | |
(local-set-key "\M-r" 'gtags-find-rtag) | |
)) | |
(add-hook | |
'c++-mode-hook | |
'(lambda () | |
(setq c-basic-offset 2) | |
(c-set-offset 'arglist-intro '+) | |
(c-set-offset 'arglist-close 0) | |
(c-set-offset 'topmost-intro-cont 0) | |
(c-set-offset 'innamespace 0) | |
)) | |
(add-hook | |
'js-mode-hook | |
'(lambda () | |
(setq js-indent-level 2) | |
)) | |
(setq perl-indent-parens-as-block t) | |
(add-to-list 'load-path "~/.emacs.d") | |
(autoload 'yuzu-mode "yuzu-mode") | |
(add-to-list 'auto-mode-alist '("\\.\\(yz\\|yzi\\)$" . yuzu-mode)) | |
(setq opam-share (substring (shell-command-to-string "opam config var share") 0 -1)) | |
(add-to-list 'load-path (concat opam-share "/tuareg")) | |
(load "tuareg-site-file") | |
(add-to-list 'load-path (concat opam-share "/emacs/site-lisp")) | |
(require 'merlin) | |
(add-hook 'tuareg-mode-hook 'merlin-mode) | |
(define-key merlin-mode-map (kbd "C-c <up>") 'merlin-type-enclosing-go-up) | |
(define-key merlin-mode-map (kbd "C-c <down>") 'merlin-type-enclosing-go-down) | |
(set-face-background 'merlin-type-face "#88FF44") | |
(require 'auto-complete) | |
(add-hook 'tuareg-mode-hook 'auto-complete-mode) | |
(require 'ocp-indent) | |
(add-hook | |
'comint-mode-hook | |
(lambda () | |
(setq comint-process-echoes t) | |
)) | |
(add-hook | |
'php-mode-hook | |
(lambda () | |
(defun ywb-php-lineup-arglist-intro (langelem) | |
(save-excursion | |
(goto-char (cdr langelem)) | |
(vector (+ (current-column) c-basic-offset)))) | |
(defun ywb-php-lineup-arglist-close (langelem) | |
(save-excursion | |
(goto-char (cdr langelem)) | |
(vector (current-column)))) | |
(c-set-offset 'arglist-intro 'ywb-php-lineup-arglist-intro) | |
(c-set-offset 'arglist-close 'ywb-php-lineup-arglist-close))) | |
(add-hook | |
'web-mode-hook | |
(lambda () | |
(setq web-mode-script-padding 4) | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment