]> git.donarmstrong.com Git - lib.git/blobdiff - emacs_el/configuration/don-configuration.org
use jumping stuff
[lib.git] / emacs_el / configuration / don-configuration.org
index 5b84028e2c55419632e36ebf43c244e5348aa5bf..e622582d09c41bb8d9e8a58618b21bd6ea678352 100644 (file)
@@ -244,12 +244,35 @@ value, scrolling continues until there is no more output.
 ** Jumping
 *** Avy
 #+BEGIN_SRC emacs-lisp
-(use-package avy
-  :ensure t
-  :bind ("C-c C-SPC" . avy-goto-word-1)
-  :config (progn
-            (setq avy-background t)
-            (key-chord-define-global "jj"  #'avy-goto-word-1)))
+  (use-package avy
+    :ensure t
+    :bind (("C-c C-<SPC>" . avy-goto-word-or-subword-1)
+           ("C-c j j" . avy-goto-word-or-subword-1)
+           ("M-g g" . avy-goto-line))
+    :config (progn (setq avy-background t))
+    )
+#+END_SRC
+*** Ace-link (jumping to links)
+#+BEGIN_SRC emacs-lisp
+  (use-package ace-link
+    :ensure t
+    ; bind o in most modes
+    :config (ace-link-setup-default))
+#+END_SRC
+*** Jumping through edit points (goto-chg)
+#+BEGIN_SRC emacs-lisp
+  (use-package goto-chg
+    :ensure t
+    :bind (("C-c j ," . goto-last-change)
+           ("C-c j ." . goto-last-change-reverse))
+#+END_SRC
+*** Jumping to bookmarks (visible bookmarks, bm)
+#+BEGIN_SRC emacs-lisp
+  (use-package bm
+    :ensure t
+    :bind (("C-c j b ." . bm-next)
+           ("C-c j b ," . bm-previous)
+           ("C-c j b SPC" . bm-toggle)))
 #+END_SRC
 
 ** Snippets
@@ -603,6 +626,7 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
 #+BEGIN_SRC emacs-lisp
   (use-package atomic-chrome
     :config (atomic-chrome-start-server)
+    (setq atomic-chrome-buffer-open-style 'full)
     )
 #+END_SRC
 ** Multiple Cursors
@@ -1316,6 +1340,21 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
             (when (member (org-get-todo-state) org-todo-keywords-1)
               (setq has-subtask t))))
         (and is-a-task (not has-subtask)))))
+  (defun bh/is-project-p ()
+    "Any task with a todo keyword subtask"
+    (save-restriction
+      (widen)
+      (let ((has-subtask)
+            (subtree-end (save-excursion (org-end-of-subtree t)))
+            (is-a-task (member (nth 2 (org-heading-components)) org-todo-keywords-1)))
+        (save-excursion
+          (forward-line 1)
+          (while (and (not has-subtask)
+                      (< (point) subtree-end)
+                      (re-search-forward "^\*+ " subtree-end t))
+            (when (member (org-get-todo-state) org-todo-keywords-1)
+              (setq has-subtask t))))
+        (and is-a-task has-subtask))))
 
   (defun bh/is-subproject-p ()
     "Any task which is a subtask of another project"
@@ -1528,8 +1567,8 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
 
   (defvar my-keys-minor-mode-map (make-keymap) "my-keys-minor-mode keymap.")
 
-  ; use iedit everywhere
-  (define-key my-keys-minor-mode-map (kbd "C-;") 'iedit-mode)
+  ; use mc everywhere
+  (define-key my-keys-minor-mode-map (kbd "C-;") 'mc/mark-all-dwim)
   ;; use outline mode keybindings everywhere
   ;; (define-key my-keys-minor-mode-map (kbd "C-;") 'my/mydra-outline/body)
 
@@ -1550,7 +1589,11 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
           (add-to-list 'minor-mode-map-alist mykeys))))
   (ad-activate 'load)
 #+END_SRC
-
+** Goto line
+#+BEGIN_SRC emacs-lisp
+  (global-unset-key "\M-g")
+  (global-set-key (kbd "M-g l") 'goto-line)
+#+END_SRC
 * Misc (uncharacterized)
 #+BEGIN_SRC emacs-lisp
   (setq bibtex-user-optional-fields (quote (("annote" "Personal annotation (ignored)") ("abstract" "") ("pmid" "") ("doi" ""))))
@@ -1681,9 +1724,6 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
 
   (setq mail-yank-prefix "> ")
 
-  (global-unset-key "\M-g")
-  (global-set-key "\M-g" 'goto-line)
-
   ;; self-insert-command hack.
   ;;   Without this, "if<SP>" expands to
   ;;   if ( -!-) {