From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Rettke Subject: Re: Custom keymaps on org blocks Date: Wed, 7 Jun 2017 19:22:10 -0500 Message-ID: References: <878tl5ugl9.fsf@nicolasgoaziou.fr> <87o9u0ylu6.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIlDJ-0003kR-99 for emacs-orgmode@gnu.org; Wed, 07 Jun 2017 20:22:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIlDI-0007iV-At for emacs-orgmode@gnu.org; Wed, 07 Jun 2017 20:22:13 -0400 Received: from mail-io0-x22f.google.com ([2607:f8b0:4001:c06::22f]:35956) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dIlDI-0007iN-5d for emacs-orgmode@gnu.org; Wed, 07 Jun 2017 20:22:12 -0400 Received: by mail-io0-x22f.google.com with SMTP id y77so13909581ioe.3 for ; Wed, 07 Jun 2017 17:22:12 -0700 (PDT) In-Reply-To: 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: John Kitchin Cc: "emacs-orgmode@gnu.org" , Nicolas Goaziou On Wed, Jun 7, 2017 at 8:50 AM, John Kitchin wrote: > On the other hand, there are times when I am working on a document that has > a lot of short code blocks, e.g. for lecture notes or blog posts, where it > is sufficiently tedious to me to switch in and out of the special edit mode These bindings make source block navigation and editing really fast and fun! (define-key org-mode-map (kbd "s-j") #'org-babel-next-src-block) (define-key org-mode-map (kbd "s-k") #'org-babel-previous-src-block) (define-key org-mode-map (kbd "s-l") #'org-edit-src-code) (define-key org-src-mode-map (kbd "s-l") #'org-edit-src-exit) Here the 'l' key binding is the most important. It makes for fast entry and exit of the source block. For my mind the default bindings "C-c '" interrupts my mental flow. It is like hearing the sound of a cash register drawer sliding out, doing some work there and then getting shoved back in every single time. Ouch. On the other hand, "s-l" both to enter and exit the source blocks, is like hearing a gentle breath of air to cool a cup of tea that is a tiny bit too warm, doing your work and then another gentle breath when you leave the block. That is the best way I can describe how much difference the two bindings make. It is really a "feels" thing, and it feels a lot better. Seriously, these bindings might make you fall in love with source block editing all the time.