Created
May 8, 2019 10:31
-
-
Save chunseoklee/91ac4cc0211c9d580f2c7f2c3386b19a to your computer and use it in GitHub Desktop.
my emacs configuration
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
;;;;;;;;; twoflower .emacs file | |
(require 'package) | |
(package-initialize) | |
(add-to-list 'package-archives | |
'("melpa" . "http://melpa.milkbox.net/packages/") t) | |
(add-to-list 'package-archives | |
'("melpa-latest" . "http://melpa.org/packages/") t) | |
(unless (package-installed-p 'use-package) | |
(package-refresh-contents) | |
(package-install 'use-package)) | |
(eval-when-compile | |
(require 'use-package)) | |
(use-package swiper | |
:ensure t) | |
(use-package counsel | |
:ensure t) | |
(use-package ivy | |
:ensure t) | |
;; (ivy-mode 1) | |
;; (setq ivy-use-virtual-buffers t) | |
;; (setq enable-recursive-minibuffers t) | |
;; (global-set-key (kbd "C-c C-r") 'ivy-resume) | |
;; (global-set-key (kbd "<f6>") 'ivy-resume) | |
;; (global-set-key (kbd "M-x") 'counsel-M-x) | |
;; (global-set-key (kbd "<f1> f") 'counsel-describe-function) | |
;; (global-set-key (kbd "<f1> v") 'counsel-describe-variable) | |
;; (global-set-key (kbd "<f1> l") 'counsel-find-library) | |
;; (global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol) | |
;; (global-set-key (kbd "<f2> u") 'counsel-unicode-char) | |
;; (global-set-key (kbd "C-c g") 'counsel-git) | |
;; (global-set-key (kbd "C-c j") 'counsel-git-grep) | |
;; (global-set-key (kbd "C-c k") 'counsel-ag) | |
;; (global-set-key (kbd "C-x l") 'counsel-locate) | |
;; (global-set-key (kbd "C-S-o") 'counsel-rhythmbox) | |
;; (define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history) | |
(use-package neotree | |
:ensure t) | |
(use-package windmove | |
:ensure t | |
:bind | |
( "S-<up>" . windmove-up) | |
( "S-<down>" . windmove-down) | |
( "S-<right>" . windmove-right) | |
( "S-<left>" . windmove-left)) | |
(use-package ace-jump-mode | |
:ensure t) | |
(use-package key-chord | |
:ensure t | |
:config | |
(key-chord-define-global "KK" 'switch-to-buffer) | |
(key-chord-define-global "JJ" 'ace-jump-char-mode) | |
(key-chord-mode 1)) | |
(use-package nyan-mode | |
:ensure t | |
:config | |
(nyan-mode 0)) | |
(use-package rtags | |
:ensure t | |
:bind ("\M->" . rtags-find-symbol) | |
("\M-?" . rtags-find-references)) | |
(use-package projectile | |
:ensure t | |
:init (use-package helm-projectile :ensure t) (use-package helm-ag :ensure t) | |
:bind ("C-c p f" . helm-projectile) | |
("C-c p s s" . helm-projectile-ag)) | |
(use-package helm | |
:ensure t | |
:config | |
(helm-mode 1) | |
:bind ("C-c C-f" . helm-find-files) | |
("\M-x" . helm-M-x)) | |
(use-package helm-fuzzier | |
:ensure t | |
:config | |
(helm-fuzzier-mode 1)) | |
(use-package magit | |
:ensure t | |
:bind ("C-x g" . magit-status)) | |
(use-package org | |
:ensure t | |
:config | |
(use-package htmlize :ensure t) | |
(use-package org-download :ensure t) | |
(org-babel-do-load-languages 'org-babel-load-languages '((latex . t) (shell . t))) | |
:bind ("C-c a" . org-agenda)) | |
(use-package yasnippet | |
:ensure t) | |
(use-package hydra | |
:ensure t) | |
;; my custom hydra to cure RSI | |
(defhydra hydra-chore (:exit nil) | |
"my personal core hydra" | |
("f" helm-find-files) | |
("0" delete-window) | |
("1" delete-other-windows) | |
("2" split-window-below) | |
("3" split-window-right) | |
("x" helm-M-x) | |
("s" save-buffer) | |
("/" swiper) | |
("j" forward-line) | |
("k" kill-buffer) | |
("l" forward-char) | |
("h" backward-char) | |
("u" scroll-up) | |
("i" scroll-down) | |
("g" magit-status) | |
("b" switch-to-buffer) | |
("a" org-agenda) | |
("o" other-window) | |
("q" nil) | |
) | |
;; custom setting | |
(key-chord-define-global "ii" 'hydra-chore/body) | |
(key-chord-define-global "//" 'swiper) | |
(key-chord-define-global "jk" 'ace-jump-char-mode) | |
(set-fontset-font t 'hangul (font-spec :name "NanumGothicCoding")) | |
(setq default-input-method "korean-hangul") | |
(setq org-agenda-files | |
'("~/doc/org/TODO.org")) | |
(setq org-todo-keywords (quote ((sequence "TODO" "NEXT" "DONE")))) | |
;;; osx key | |
(setq x-alt-keysym 'meta) | |
(setq inhibit-splash-screen t) | |
(set-face-attribute 'default nil :height 160) | |
(setq-default indent-tabs-mode nil) | |
;; manual package path. load-path should not contain traling slash! | |
(add-to-list 'load-path "~/.emacs.d/lisp") | |
(add-to-list 'load-path "~/dev/rtags/src") | |
;; default path | |
(setq default-directory "~/dev/") | |
;; etags key setting : M-[, M-] for prev next tag | |
(global-set-key "\M-." 'xref-find-definitions) | |
(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 tool-bar-mode nil) | |
(setq menu-bar-mode nil) | |
(load-theme 'misterioso) | |
(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. | |
'(package-selected-packages | |
(quote | |
(yasnippet-classic-snippets markdown-mode evil counsel protobuf-mode swiper hydra yasnippet org-download htmlize magit helm-fuzzier helm-ag helm-projectile projectile rtags nyan-mode key-chord ace-jump-mode neotree use-package)))) | |
(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