X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=emacs.d%2Fconfig.org;h=391f3801036602a676dcf54fcdb79e4d646f43e2;hb=40a0fb350e4baa200b6560e07d899a8e462275f8;hp=f2325bde32459ee26bb58215e5adaa47a2016f71;hpb=6ee27ef75cc00f33e2420e79cb29eb759c68bab9;p=dotfiles.git diff --git a/emacs.d/config.org b/emacs.d/config.org index f2325bd..391f380 100644 --- a/emacs.d/config.org +++ b/emacs.d/config.org @@ -350,6 +350,8 @@ clean mode line, Refer to [[https://www.masteringemacs.org/article/hiding-replac (auto-revert-mode . "") ;; default is Ind (org-indent-mode . "") + ;; default is Fly + (flyspell-mode . "") ;; Major modes (lisp-interaction-mode . "λ") (hi-lock-mode . "") @@ -619,6 +621,15 @@ Make flyspell enabled for org-mode, see [[http://emacs.stackexchange.com/questio (if (and b e (< (point) e)) (setq rlt nil))) (setq ad-return-value rlt))) #+END_SRC + +*** Expand-region +#+BEGIN_SRC emacs-lisp :tangle yes :results silent + (use-package expand-region + :ensure t + :config + (global-set-key (kbd "C-=") 'er/expand-region)) +#+END_SRC + ** Motion *** Avy #+BEGIN_SRC emacs-lisp :tangle yes :results silent @@ -630,11 +641,13 @@ Make flyspell enabled for org-mode, see [[http://emacs.stackexchange.com/questio *** =M-g= prefix #+BEGIN_SRC emacs-lisp :tangle yes :results silent - (global-set-key (kbd "M-g g") 'avy-goto-line) + (global-set-key (kbd "M-g j") 'avy-goto-line-below) + (global-set-key (kbd "M-g k") 'avy-goto-line-above) + (global-set-key (kbd "M-g w") 'avy-goto-word-1-below) + (global-set-key (kbd "M-g b") 'avy-goto-word-1-above) (global-set-key (kbd "M-g e") 'avy-goto-word-0) - (global-set-key (kbd "M-g w") 'avy-goto-word-1) - (global-set-key (kbd "M-g c") 'avy-goto-char-timer) - (global-set-key (kbd "M-g f") 'avy-goto-char-in-line) + (global-set-key (kbd "M-g f") 'avy-goto-char-timer) + (global-set-key (kbd "M-g c") 'avy-goto-char-in-line) ;; M-g TAB move-to-column ;; M-g ESC Prefix Command @@ -710,13 +723,6 @@ Use =ESC= to exit minibuffer. Also I map =Super-h= the same as =C-g= ;; C-7 ;; C-Space - - - - - - - #+END_SRC ** =Super= bindings for file, buffer and windows @@ -1293,7 +1299,8 @@ and Defined keys, using vi keybindings, Refer abo-abo's setting [[https://github magit-staged-section-map)) (define-key map "j" 'magit-section-forward) (define-key map "k" 'magit-section-backward) - (define-key map "D" 'magit-discard-file) + (define-key map "D" 'magit-discard) + (define-key map "O" 'magit-discard-file) (define-key map "n" nil) (define-key map "p" nil) (define-key map "v" 'recenter-top-bottom) @@ -1725,6 +1732,26 @@ Play Go in Emacs, gnugo xpm refert [[https://github.com/okanotor/dotemacs/blob/f ** TODO bookmark ** TODO Calendar +** advice info +#+BEGIN_SRC emacs-lisp :tangle yes :results silent + (defun sd/info-mode () + (interactive) + (unless (equal major-mode 'Info-mode) + (unless (> (length (window-list)) 1) + (split-window-right)) + (other-window 1) + ;; (info) + )) + + ;; (global-set-key (kbd "C-h i") 'sd/info-mode) + + ;; open Info buffer in other window instead of current window + (defadvice info (before my-info (&optional file buf) activate) + (sd/info-mode)) + + (defadvice Info-exit (after my-info-exit activate) + (sd/delete-current-window)) +#+END_SRC * Programming