From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: evil-mode and org Date: Thu, 30 Mar 2017 16:48:07 +0100 Message-ID: <87k276kbpk.fsf@ucl.ac.uk> References: <1a0d15aafd944fa3864394d8e212046f@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> <87y3vom81v.fsf@ucl.ac.uk> <2addcb35f67b455ba02295550e5b2ec7@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> Reply-To: Eric S Fraga Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctoVt-0005Uw-34 for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 00:50:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctoVq-0008QC-0U for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 00:50:17 -0400 Received: from mail-db5eur01on0114.outbound.protection.outlook.com ([104.47.2.114]:31472 helo=EUR01-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ctoVp-0008Pi-BA for emacs-orgmode@gnu.org; Fri, 31 Mar 2017 00:50:13 -0400 In-Reply-To: <2addcb35f67b455ba02295550e5b2ec7@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> (Guido Van Hoecke's message of "Thu, 30 Mar 2017 10:14:07 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Thursday, 30 Mar 2017 at 10:14, Guido Van Hoecke wrote: > Eric, > > Care to share your org-evil mappings? sure: #+begin_src emacs-lisp (defun esf/evil-key-bindings-for-org () ;;(message "Defining evil key bindings for org") (when (fboundp 'evil-declare-key) ;; normal, motion and visual commands (mapcar (lambda (state) (evil-declare-key state org-mode-map " " 'evil-scroll-down " e" 'org-edit-special " g" 'org-babel-goto-named-src-block " j" 'org-babel-next-src-block " k" 'org-babel-previous-src-block " l" 'org-next-link " n" 'org-babel-next-src-block " p" 'org-babel-previous-src-block " u" 'outline-up-heading "gh" 'outline-up-heading "gj" 'org-forward-heading-same-level "gk" 'org-backward-heading-same-level "gl" 'outline-next-visible-heading "t" 'org-todo ; mark a TODO item as DONE ",e" 'org-export-dispatch ",i" 'org-inlinetask-insert-task ",l" 'org-insert-link ",L" 'org-store-link ",n" 'outline-next-visible-heading ",oa" #'org-annotate-add-note ",od" #'org-annotate-display-notes ",p" 'outline-previous-visible-heading ",r" 'org-ref-insert-cite-link ;; ",t" 'org-set-tags-command ",u" 'outline-up-heading "$" 'org-end-of-line ; smarter behaviour on headlines etc. "^" 'org-beginning-of-line ; ditto "-" 'org-ctrl-c-minus ; change bullet style "<" 'org-metaleft ; out-dent ">" 'org-metaright ; indent (kbd "M-l") 'org-metaright (kbd "M-h") 'org-metaleft (kbd "M-k") 'org-metaup (kbd "M-j") 'org-metadown (kbd "M-L") 'org-shiftmetaright (kbd "M-H") 'org-shiftmetaleft (kbd "M-K") 'org-shiftmetaup (kbd "M-J") 'org-shiftmetadown)) '(normal motion visual)) ;; and these are only for motion and visual so that . does not repeat= them (mapcar (lambda (state) (evil-declare-key state org-mode-map "H" 'org-beginning-of-line ; smarter behaviour on headlin= es etc. ;; "L" 'end-of-line ; do not want "smarter" behaviour on = headlines etc. "L" 'org-end-of-line ; do not want "smarter" behaviour on= headlines etc. )) '(motion visual)) (evil-declare-key 'insert org-mode-map (kbd "") 'hungry-delete-backward=20=20 (kbd "M-l") 'org-metaright (kbd "M-h") 'org-metaleft (kbd "M-k") 'org-metaup (kbd "M-j") 'org-metadown (kbd "M-L") 'org-shiftmetaright (kbd "M-H") 'org-shiftmetaleft (kbd "M-K") 'org-shiftmetaup (kbd "M-J") 'org-shiftmetadown) (when (not esf/pandora-p) (evil-declare-key 'insert org-mode-map (kbd "") 'hungry-delete-backward)))) #+end_src > One 'conflict' which bites me every time is this: I cannot help with this unfortunately other than to maybe trying to advise the search function... =2D-=20 : Eric S Fraga (0xFFFCF67D), Emacs 25.1.1, Org release_9.0.5-391-g36c7cf --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSPXCedOQfhSlwpVw3IkZPY//z2fQUCWN0otwAKCRDIkZPY//z2 fYktAJ4r+cU4L6NwYlztiJID5Lgm8LaI2gCfdesmaiBs1IHx7pKVSSYAuKEq2RQ= =+D9n -----END PGP SIGNATURE----- --=-=-=--