From mboxrd@z Thu Jan 1 00:00:00 1970 From: Herbert Sitz Subject: Re: adding custom org-keymaps for EVIL Vim emulator Date: Tue, 28 Feb 2012 23:59:23 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2WxP-0007M0-Je for emacs-orgmode@gnu.org; Tue, 28 Feb 2012 18:59:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2WxN-0008CV-GL for emacs-orgmode@gnu.org; Tue, 28 Feb 2012 18:59:47 -0500 Received: from plane.gmane.org ([80.91.229.3]:38844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2WxN-0008C0-9G for emacs-orgmode@gnu.org; Tue, 28 Feb 2012 18:59:45 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1S2WxE-0000yK-I6 for emacs-orgmode@gnu.org; Wed, 29 Feb 2012 00:59:36 +0100 Received: from c-24-22-131-140.hsd1.wa.comcast.net ([24.22.131.140]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 29 Feb 2012 00:59:36 +0100 Received: from hesitz by c-24-22-131-140.hsd1.wa.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 29 Feb 2012 00:59:36 +0100 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Herbert Sitz gmail.com> writes: > > (define-minor-mode evil-org-mode > "minor mode to add evil keymappings to Org-mode." > :keymap (make-sparse-keymap) > (evil-local-mode t)) > Whoops, I left out the earlier lines to load and enable Evil. They are below. I commented out the (evil-mode 1), which enables evil-mode in all buffers and instead call evil-local-mode in the hook function that's called when a buffer is set to 'org' type. I assume there's some better way to do this, since I do want to use Evil mode in most buffers, not just org buffers. But I was having problems in the date-editing mini buffer if I had (evil-mode 1) so I took the easy way of getting rid of that. . . Also, Evil must of course be installed before you can do these custom mappings. Here's home page for Evil: https://gitorious.org/evil/pages/Home vvvvv below to be in .emacs file vvvvv -------------------------------- (add-to-list 'load-path "c:/Program Files (x86)/Emacs/emacs/lisp/evil") (require 'evil) ; comment out line below to activate evil only in org-buffers ;(evil-mode 1) ; lines above go in .emacs above lines from previous post, which ; start as. . . (define-minor-mode evil-org-mode "minor mode to add evil keymappings to Org-mode." :keymap (make-sparse-keymap) (evil-local-mode t)) [. . .]