-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackages.el
44 lines (37 loc) · 1.25 KB
/
packages.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
;;; packages.el --- tw4e layer packages file for Spacemacs.
;;
;; Copyright (c) 2012-2017 Sylvain Benner & Contributors
;;
;; Author: Sheda <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;;; Code:
(defconst tw4e-packages '((tw4e :location local)))
(defun tw4e/init-tw4e ()
"Initialize the tw4e package."
(use-package tw4e
:commands (tw4e/popup-headers tw4e/edit-mode)
:init
(evil-leader/set-key "at" 'tw4e/popup-headers)
:config
(tw4e/setup)
(evilified-state-evilify tw4e/headers-mode tw4e/headers-mode-map)
))
(defun tw4e/post-init-tw4e ()
"Post-initialize the tw4e package."
;; XXX Don't know why tw4e/edit-mode-map is not automagically bound to the
;; major mode leader key (,).
(spacemacs/set-leader-keys-for-major-mode
'tw4e/edit-mode "f" 'tw4e/edit-finish)
(spacemacs/set-leader-keys-for-major-mode
'tw4e/edit-mode "c" 'tw4e/edit-cancel)
;; XXX Kludge to make it work with the keyboard-layout setup for Bépo.
(add-hook 'tw4e/headers-mode-hook
(lambda ()
(define-key evil-evilified-state-map "t" 'next-line)
(define-key evil-evilified-state-map "s" 'previous-line)))
)
;;; packages.el ends here