Created
February 2, 2018 10:35
-
-
Save cuspymd/c180d9e56cfc0ffea3b54db725128b0d to your computer and use it in GitHub Desktop.
.emacs for windows
This file contains hidden or 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 url-proxy-services | |
'(("http" . "168.219.61.252:8080"))) | |
(server-start) | |
(put 'upcase-region 'disabled nil) | |
(fset 'find-next-tag "\C-u\256") ; macro for C-u M-. | |
(fset 'find-prev-tag "\C-u-\256") ; macro for C-u - M-. | |
(global-set-key "\M-]" 'find-next-tag) | |
(global-set-key "\M-[" 'find-prev-tag) | |
;(setq explicit-shell-file-name "bash.exe") | |
;(setq shell-file-name explicit-shell-file-name) | |
;(eval-after-load "dired" '(require 'dired+)) | |
;(eval-after-load "dired-x" '(require 'dired+)) | |
;(require 'bookmark+) | |
;(require 'icicles) | |
;(icy-mode 1) | |
(global-hi-lock-mode 1) | |
(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. | |
'(ansi-color-faces-vector | |
[default default default italic underline success warning error]) | |
'(ansi-color-names-vector | |
["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"]) | |
'(custom-safe-themes | |
(quote | |
("e8586a76a96fd322ccb644ca0c3a1e4f4ca071ccfdb0f19bef90c4040d5d3841" "fbcdb6b7890d0ec1708fa21ab08eb0cc16a8b7611bb6517b722eba3891dfc9dd" "e87a2bd5abc8448f8676365692e908b709b93f2d3869c42a4371223aab7d9cf8" default))) | |
'(dired-dwim-target t) | |
'(file-coding-system-alist | |
(quote | |
(("\\.dz\\'" no-conversion . no-conversion) | |
("\\.txz\\'" no-conversion . no-conversion) | |
("\\.xz\\'" no-conversion . no-conversion) | |
("\\.lzma\\'" no-conversion . no-conversion) | |
("\\.lz\\'" no-conversion . no-conversion) | |
("\\.g?z\\'" no-conversion . no-conversion) | |
("\\.\\(?:tgz\\|svgz\\|sifz\\)\\'" no-conversion . no-conversion) | |
("\\.tbz2?\\'" no-conversion . no-conversion) | |
("\\.bz2\\'" no-conversion . no-conversion) | |
("\\.Z\\'" no-conversion . no-conversion) | |
("\\.elc\\'" . utf-8-emacs) | |
("\\.el\\'" . prefer-utf-8) | |
("\\.utf\\(-8\\)?\\'" . utf-8) | |
("\\.xml\\'" . xml-find-file-coding-system) | |
("\\(\\`\\|/\\)loaddefs.el\\'" raw-text . raw-text-unix) | |
("\\.tar\\'" no-conversion . no-conversion) | |
("\\.po[tx]?\\'\\|\\.po\\." . po-find-file-coding-system) | |
("\\.\\(tex\\|ltx\\|dtx\\|drv\\)\\'" . latexenc-find-file-coding-system) | |
("\\.js\\'" . utf-8)))) | |
'(ibuffer-saved-filters | |
(quote | |
(("gnus" | |
((or | |
(mode . message-mode) | |
(mode . mail-mode) | |
(mode . gnus-group-mode) | |
(mode . gnus-summary-mode) | |
(mode . gnus-article-mode)))) | |
("programming" | |
((or | |
(mode . emacs-lisp-mode) | |
(mode . cperl-mode) | |
(mode . c-mode) | |
(mode . java-mode) | |
(mode . idl-mode) | |
(mode . web-mode) | |
(mode . js2-mode) | |
(mode . lisp-mode))))))) | |
'(indent-tabs-mode nil) | |
'(js2-include-node-externs t) | |
'(org-agenda-files (quote ("d:/My Documents/org/"))) | |
'(org-default-notes-file "d:/My Documents/org/notes.org") | |
'(org-use-speed-commands t) | |
'(package-selected-packages | |
(quote | |
(company tide typescript-mode csharp-mode web-mode popup org material-theme makey magit json-mode js2-refactor ido-ubiquitous htmlize flx-ido counsel coffee-mode))) | |
'(scroll-bar-mode (quote left)) | |
'(shell-file-name "bash") | |
'(show-paren-mode t) | |
'(tab-width 4)) | |
(put 'scroll-left 'disabled nil) | |
;(when window-system | |
;(set-face-font 'default "-outline-Courier New-normal-normal-normal-mono-16-*-*-*-c-*-iso10646-1") | |
;(set-face-font 'default "-outline-Bitstream Vera Sans Mono-normal-normal-normal-mono-16-*-*-*-c-*-iso10646-1") | |
;(set-face-font 'default "-outline-DejaVu Sans Mono-normal-normal-normal-mono-16-*-*-*-c-*-iso10646-1") | |
;(set-face-font 'default "-outline-Liberation Mono-normal-normal-normal-mono-16-*-*-*-c-*-iso10646-1") | |
;(set-fontset-font "fontset-default" 'hangul '("malgun gothic" . "unicode-bmp")) | |
;(set-fontset-font "fontset-default" '(#x1100 . #xffdc) '("malgun gothic" . "unicode-bmp")) ;; 유니코드 한글영역 | |
;(set-fontset-font "fontset-default" 'kana '("ms mincho" . "unicode-bmp")) | |
;(set-fontset-font "fontset-default" 'han '("ms mincho" . "unicode-bmp")) | |
;(set-fontset-font "fontset-default" 'cjk-misc '("ms mincho" . "unicode-bmp")) | |
;(set-fontset-font "fontset-default" '(#xe0bc . #xf66e) '("new gulim" . "unicode-bmp")) ;; 유니코드 사용자 영역 | |
;) | |
(put 'set-goal-column 'disabled nil) | |
(defalias 'list-buffers 'ibuffer) | |
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode)) | |
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode)) | |
(setq ibuffer-formats | |
'((mark modified read-only " " | |
(name 30 30 :left :elide) " " | |
(size 9 -1 :right) " " | |
(mode 16 16 :left :elide) " " filename-and-process) | |
(mark " " (name 16 -1) " " filename))) | |
(defun eshell-clear () | |
"04Dec2001 - sailor, to clear the eshell buffer." | |
(interactive) | |
(let ((inhibit-read-only t)) | |
(erase-buffer))) | |
(defun hextodec () | |
"translate hex to decimal" | |
(interactive) | |
(beginning-of-buffer) | |
(let ((num)) | |
(while (forward-word 1) | |
(backward-kill-word 1) | |
(insert (number-to-string | |
(progn (setq num (string-to-number (current-kill 0) 16)) | |
(if (> num 2147483647) (setq num (logior num -4294967296)) nil) | |
num))))) | |
) | |
(setq c-default-style "linux" | |
c-basic-offset 4) | |
;; Prevent issues with the Windows null device (NUL) | |
;; when using cygwin find with rgrep. | |
(defadvice grep-compute-defaults (around grep-compute-defaults-advice-null-device) | |
"Use cygwin's /dev/null as the null-device." | |
(let ((null-device "/dev/null")) | |
ad-do-it)) | |
(ad-activate 'grep-compute-defaults) | |
(require 'package) | |
(add-to-list 'package-archives | |
'("melpa" . "http://melpa.org/packages/")) | |
(package-initialize) | |
(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. | |
'(default ((t (:family "Courier10 BT" :foundry "outline" :slant normal :weight normal :height 120 :width normal))))) | |
(when (eq system-type 'windows-nt) | |
;; use specific font for Korean charset. | |
;; if you want to use different font size for specific charset, | |
;; add :size POINT-SIZE in the font-spec. | |
(set-fontset-font t 'hangul (font-spec :family "malgun gothic")) | |
;; you may want to add different for other charset in this way. | |
) | |
(setq face-font-rescale-alist | |
'((".*malgun.*" . 1.55))) | |
(global-set-key "\C-cl" 'org-store-link) | |
(global-set-key "\C-cc" 'org-capture) | |
(global-set-key "\C-ca" 'org-agenda) | |
(global-set-key "\C-cb" 'org-iswitchb) | |
(require 'js2-refactor) | |
(add-hook 'js2-mode-hook #'js2-refactor-mode) | |
(js2r-add-keybindings-with-prefix "C-c C-m") | |
(add-hook 'js2-mode-hook | |
(lambda() | |
(font-lock-add-keywords nil | |
'(("\\<\\(FIXME\\|TODO\\|XXX+\\|BUG\\):" | |
1 'font-lock-warning-face prepend))))) | |
(set-face-underline 'font-lock-warning-face "yellow") | |
(require 'yasnippet) | |
(yas-reload-all) | |
(add-hook 'web-mode-hook 'yas-minor-mode) | |
;(load-theme 'material t) | |
(menu-bar-mode -1) | |
(when (fboundp 'tool-bar-mode) | |
(tool-bar-mode -1)) | |
(when (fboundp 'scroll-bar-mode) | |
(scroll-bar-mode -1)) | |
(when (fboundp 'horizontal-scroll-bar-mode) | |
(horizontal-scroll-bar-mode -1)) | |
(require 'flx-ido) | |
(ido-mode 1) | |
(ido-everywhere 1) | |
(flx-ido-mode 1) | |
(ido-ubiquitous-mode 1) | |
(setq ido-enable-flex-matching t) | |
;; (setq ido-use-faces nil) | |
(setq ido-use-virtual-buffers t) | |
;; (ivy-mode 1) | |
;; (setq ivy-use-virtual-buffers t) | |
;; (setq ivy-count-format "(%d/%d) ") | |
;; (global-set-key (kbd "C-c C-r") 'ivy-resume) | |
;; (global-set-key (kbd "M-x") 'counsel-M-x) | |
;; (global-set-key (kbd "C-x C-f") 'counsel-find-file) | |
;; (global-set-key (kbd "C-c g") 'counsel-git) | |
;; (global-set-key (kbd "C-c j") 'counsel-git-grep) | |
;(add-hook 'json-mode-hook | |
; (lambda () | |
; (setq tab-width 2) | |
; (setq js-indent-level 2))) | |
(setq inhibit-startup-message t) ;; hide the startup message | |
(defun setup-tide-mode () | |
(interactive) | |
(tide-setup) | |
(flycheck-mode +1) | |
(setq flycheck-check-syntax-automatically '(save mode-enabled)) | |
(eldoc-mode +1) | |
(tide-hl-identifier-mode +1) | |
;; company is an optional dependency. You have to | |
;; install it separately via package-install | |
;; `M-x package-install [ret] company` | |
(company-mode +1)) | |
;; aligns annotation to the right hand side | |
(setq company-tooltip-align-annotations t) | |
(add-hook 'typescript-mode-hook #'setup-tide-mode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment