aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/init/ycp-markup.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/init/ycp-markup.el')
-rw-r--r--emacs/.emacs.d/init/ycp-markup.el26
1 files changed, 23 insertions, 3 deletions
diff --git a/emacs/.emacs.d/init/ycp-markup.el b/emacs/.emacs.d/init/ycp-markup.el
index e03fd86..5f21da7 100644
--- a/emacs/.emacs.d/init/ycp-markup.el
+++ b/emacs/.emacs.d/init/ycp-markup.el
@@ -72,7 +72,11 @@
(my-keybind wiki-mode-map
"C-'" #'my-wiki-grok-wikipedia)
(my-setq-from-local wiki-sites)
- (wiki-define-site-commands))
+ (wiki-define-site-commands)
+ (add-to-list 'browse-url-handlers
+ `(wiki-engine-entry-url-p
+ . ,(lambda (url &rest _) (wiki-open-url url))))
+ )
(my-package ledger-mode
(:install t)
@@ -83,17 +87,33 @@
(setq-local completion-cycle-threshold t)
(setq-local ledger-complete-in-steps t)
(setq-local company-mode nil)))
- (setq ledger-binary-path "hledger"))
+ (setq ledger-binary-path "hledger")
+ (require 'my-ledger)
+ (my-keybind ledger-mode-map
+ "M-<down>" #'my-ledger-move-xact-down
+ "M-<up>" #'my-ledger-move-xact-up
+ "C-c C-c" #'compile)
+ (add-to-list 'compilation-error-regexp-alist 'ledger)
+ (add-to-list 'compilation-error-regexp-alist-alist my-ledger-compilation-error-re)
+ (add-hook 'ledger-mode-hook 'my-ledger-set-compile-command)
+ )
;;; todo: open epub in emacs client with nov
(my-package nov
(:delay 15)
(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
- (setq nov-text-width fill-column)
+ ;; No fill, so it requires visual line mode to look nice
+ (setq nov-text-width t)
+ (add-hook 'nov-mode-hook 'visual-line-mode)
(add-hook 'nov-mode-hook 'follow-mode)
+ (add-hook 'nov-mode-hook (lambda ()
+ (setq next-screen-context-lines 4)))
+ (add-hook 'nov-post-html-render-hook 'my-nov-set-margins)
(require 'my-nov)
(my-override nov-render-title)
(my-override nov-scroll-up)
+ (my-keybind nov-mode-map
+ "Q" #'my-nov-copy-buffer-file-with-staging)
)
;;; json-mode