Move origami configuration to use-package
This commit is contained in:
parent
ce55bc4eb6
commit
6938f57981
40
init.el
40
init.el
@ -160,7 +160,6 @@
|
|||||||
(require 'thingatpt)
|
(require 'thingatpt)
|
||||||
(require 'xlicense)
|
(require 'xlicense)
|
||||||
(require 'linum)
|
(require 'linum)
|
||||||
(require 'origami)
|
|
||||||
|
|
||||||
(use-package helm
|
(use-package helm
|
||||||
:init
|
:init
|
||||||
@ -281,6 +280,28 @@
|
|||||||
:init
|
:init
|
||||||
(setq-default magit-gerrit-remote "gerrit"))
|
(setq-default magit-gerrit-remote "gerrit"))
|
||||||
|
|
||||||
|
(use-package origami
|
||||||
|
:ensure t
|
||||||
|
:demand
|
||||||
|
:config
|
||||||
|
(define-prefix-command 'origami-mode-map)
|
||||||
|
(global-set-key (kbd "C-x C-z") 'origami-mode-map)
|
||||||
|
(global-origami-mode)
|
||||||
|
:bind
|
||||||
|
(:map origami-mode-map
|
||||||
|
("o" . origami-open-node)
|
||||||
|
("O" . origami-open-node-recursively)
|
||||||
|
("c" . origami-close-node)
|
||||||
|
("C" . origami-close-node-recursively)
|
||||||
|
("a" . origami-toggle-node)
|
||||||
|
("A" . origami-recursively-toggle-node)
|
||||||
|
("R" . origami-open-all-nodes)
|
||||||
|
("M" . origami-close-all-nodes)
|
||||||
|
("v" . origami-show-only-node)
|
||||||
|
("k" . origami-previous-fold)
|
||||||
|
("j" . origami-forward-fold)
|
||||||
|
("x" . origami-reset)))
|
||||||
|
|
||||||
(use-package ag
|
(use-package ag
|
||||||
:bind
|
:bind
|
||||||
(("C-x M-a" . ag)
|
(("C-x M-a" . ag)
|
||||||
@ -452,24 +473,7 @@
|
|||||||
(global-set-key (kbd "C-x C-d") 'delete-current-buffer-file)
|
(global-set-key (kbd "C-x C-d") 'delete-current-buffer-file)
|
||||||
(global-set-key (kbd "C-x ~") 'toggle-char-case)
|
(global-set-key (kbd "C-x ~") 'toggle-char-case)
|
||||||
|
|
||||||
;; Origami mode keys
|
|
||||||
(define-key global-map (kbd "C-x C-z") 'origami-mode-map)
|
|
||||||
(define-prefix-command 'origami-mode-map)
|
|
||||||
(define-key origami-mode-map (kbd "o") 'origami-open-node)
|
|
||||||
(define-key origami-mode-map (kbd "O") 'origami-open-node-recursively)
|
|
||||||
(define-key origami-mode-map (kbd "c") 'origami-close-node)
|
|
||||||
(define-key origami-mode-map (kbd "C") 'origami-close-node-recursively)
|
|
||||||
(define-key origami-mode-map (kbd "a") 'origami-toggle-node)
|
|
||||||
(define-key origami-mode-map (kbd "A") 'origami-recursively-toggle-node)
|
|
||||||
(define-key origami-mode-map (kbd "R") 'origami-open-all-nodes)
|
|
||||||
(define-key origami-mode-map (kbd "M") 'origami-close-all-nodes)
|
|
||||||
(define-key origami-mode-map (kbd "v") 'origami-show-only-node)
|
|
||||||
(define-key origami-mode-map (kbd "k") 'origami-previous-fold)
|
|
||||||
(define-key origami-mode-map (kbd "j") 'origami-forward-fold)
|
|
||||||
(define-key origami-mode-map (kbd "x") 'origami-reset)
|
|
||||||
|
|
||||||
;; Set up some global minor modes
|
;; Set up some global minor modes
|
||||||
(global-origami-mode t)
|
|
||||||
(show-paren-mode t)
|
(show-paren-mode t)
|
||||||
(global-prettify-symbols-mode t)
|
(global-prettify-symbols-mode t)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user