]> git.eshelyaron.com Git - dotfiles.git/commitdiff
Migrate to C-c bindings to clear C-x w
authorEshel Yaron <me@eshelyaron.com>
Mon, 19 Sep 2022 11:34:55 +0000 (14:34 +0300)
committerEshel Yaron <me@eshelyaron.com>
Mon, 19 Sep 2022 11:34:55 +0000 (14:34 +0300)
.emacs.d/esy.org

index b6aa5efcc77275fc3ab9b248ab0850fc58942cb4..eea040c98f1d278c61ce6bb6d1f5c6f99cfbed7e 100644 (file)
@@ -378,6 +378,8 @@ For a list of available frame parameters, see [[info:elisp#Frame Parameters][eli
   (with-eval-after-load 'org
     (require 'ob)
     (require 'ob-prolog)
+    (require 'ob-sql)
+    (require 'org-tempo)
     (setq org-agenda-files `(,esy/inbox-path ,esy/journal-path)
           org-default-notes-file esy/inbox-path
           org-agenda-start-on-weekday 0
@@ -756,6 +758,25 @@ refiling directly into deeper headings as well.
 :CUSTOM_ID: global-keybindings
 :END:
 
+** =C-c= keybindings
+:PROPERTIES:
+:CUSTOM_ID: ctrl-c-bindings
+:END:
+
+#+begin_src emacs-lisp
+  (keymap-global-set "C-c p" sweep-prefix-map)
+  (keymap-global-set "C-c w" #'esy/eww)
+  (keymap-global-set "C-c c" #'org-capture)
+  (keymap-global-set "C-c l" #'org-store-link)
+  (keymap-global-set "C-c j" #'org-agenda)
+  (keymap-global-set "C-c !" #'consult-flymake)
+  (keymap-global-set "C-c E" #'elfeed)
+  (keymap-global-set "C-c G" #'gnus)
+  (keymap-global-set "C-c S" #'esy/vterm-at)
+  (keymap-global-set "C-c V" #'vertalen-at-point)
+  (keymap-global-set "C-c F" #'esy/find-esy-org)
+#+end_src
+
 ** Custom kill command                                                 :cmd:
 :PROPERTIES:
 :CUSTOM_ID: kill-dwim-command
@@ -828,6 +849,7 @@ refiling directly into deeper headings as well.
     (global-set-key (kbd "C-;") #'avy-goto-char-timer)
     (global-set-key (kbd "C-s-p") #'esy/present-buffer)
     (global-set-key (kbd "C-s-f") #'toggle-frame-fullscreen)
+    (global-set-key (kbd "s-j") sweep-prefix-map)
     (global-set-key (kbd "C-s-l") #'esy/pulse-line))
 
   (add-hook 'after-init-hook #'esy/customize-global-keymap)
@@ -850,7 +872,6 @@ refiling directly into deeper headings as well.
     (keymap-set ctl-x-map "o" #'ace-window)
     (keymap-set ctl-x-map "F" #'esy/find-esy-org)
     (keymap-set ctl-x-map "O" #'other-window)
-    (keymap-set ctl-x-map "w" #'esy/eww)
     (keymap-set ctl-x-map "S" #'esy/vterm-at)
     (keymap-set ctl-x-map "V" #'vertalen-at-point)
     (keymap-set ctl-x-map "G" #'gnus)
@@ -894,6 +915,9 @@ refiling directly into deeper headings as well.
 :END:
 
 ** denote
+:PROPERTIES:
+:CUSTOM_ID: denote
+:END:
 
 #+begin_src emacs-lisp
   (require 'denote)
@@ -1523,13 +1547,15 @@ include =emacs-lisp-mode= and =lisp-interaction-mode=.
 :CUSTOM_ID: prolog
 :END:
 
-#+begin_src emacs-lisp
-  (add-to-list 'auto-mode-alist '("\\.pl\\'"  . prolog-mode))
-  (add-to-list 'auto-mode-alist '("\\.plt\\'" . prolog-mode))
+*** Setup =sweep=
+:PROPERTIES:
+:CUSTOM_ID: setup-sweep
+:END:
 
-  (with-eval-after-load 'recentf
-    (add-to-list 'recentf-exclude (rx (seq "/usr/local/lib/swipl/library/" (+ anychar) ".pl")))
-    (setq recentf-max-saved-items 32))
+#+begin_src emacs-lisp
+  (require 'sweep)
+  (add-to-list 'auto-mode-alist '("\\.pl\\'"  . sweep-mode))
+  (add-to-list 'auto-mode-alist '("\\.plt\\'" . sweep-mode))
 #+end_src
 
 *** Make =rg= regard =.pl= files as Prolog rather than Perl
@@ -1543,6 +1569,9 @@ include =emacs-lisp-mode= and =lisp-interaction-mode=.
 #+end_src
 
 *** Integrate Prolog with =project.el=
+:PROPERTIES:
+:CUSTOM_ID: prolog-project
+:END:
 
 #+begin_src emacs-lisp
   (with-eval-after-load 'project
@@ -1565,9 +1594,12 @@ include =emacs-lisp-mode= and =lisp-interaction-mode=.
     (add-hook 'pdf-view-mode-hook #'pdf-view-midnight-minor-mode)
     (setq TeX-view-program-selection '((output-pdf "PDF Tools"))
           TeX-source-correlate-start-server t)
+    (add-to-list 'revert-without-query "\\.pdf\\'")
     (add-hook 'TeX-after-compilation-finished-functions
               #'TeX-revert-document-buffer)
     (add-to-list 'auto-mode-alist '("\\.pdf\\'" . pdf-view-mode)))
+
+  (add-hook 'after-init-hook #'esy/pdf-tools-install)
 #+end_src
 
 * =vc= customizations
@@ -1841,7 +1873,8 @@ terminates, e.g. when pressing =C-d=.
     (require 'which-key)
     (require 'whitespace-cleanup-mode)
     (setq global-auto-revert-non-file-buffers t
-          auto-revert-verbose nil)
+          auto-revert-verbose nil
+          query-about-changed-file t)
     (global-auto-revert-mode)
     (which-key-mode)
     (global-whitespace-cleanup-mode 1))
@@ -1850,6 +1883,9 @@ terminates, e.g. when pressing =C-d=.
 #+end_src
 
 ** Add a repeat-map to =tranpose-lines=
+:PROPERTIES:
+:CUSTOM_ID: repeat-transpose-lines
+:END:
 #+begin_src emacs-lisp
   (defvar-keymap transpose-lines-repeat-map
     :doc "Repeat map for \\[transpose-lines]"
@@ -1859,6 +1895,9 @@ terminates, e.g. when pressing =C-d=.
 
 #+end_src
 ** Use =consult= to show =xref= results
+:PROPERTIES:
+:CUSTOM_ID: consult-xref
+:END:
 #+begin_src emacs-lisp
   (with-eval-after-load 'xref
     (setq xref-show-definitions-function #'consult-xref
@@ -1919,6 +1958,9 @@ Add the timezones of places of interest to the list of clocks shown by
 #+end_src
 
 ** Sibling files
+:PROPERTIES:
+:CUSTOM_ID: find-sibling
+:END:
 #+begin_src emacs-lisp
   (setq find-sibling-rules '(("\\([^/]+\\)\\.c\\'" "\\1.h")))
 #+end_src