emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Grant Rettke <gcr@wisdomandwonder.com>
To: John Kitchin <jkitchin@andrew.cmu.edu>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>,
	Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: Custom keymaps on org blocks
Date: Wed, 7 Jun 2017 19:22:10 -0500	[thread overview]
Message-ID: <CAAjq1mc4MYc8Tav3cpc8qBC897g9zRE8m44-0rOfoT=AudJXCQ@mail.gmail.com> (raw)
In-Reply-To: <CAJ51EToHV7dtq1wh0k_b_MjhmU1rKFvse8bEAtRrUAxFLHgYMQ@mail.gmail.com>

On Wed, Jun 7, 2017 at 8:50 AM, John Kitchin <jkitchin@andrew.cmu.edu> 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.

  reply	other threads:[~2017-06-08  0:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-05 21:53 Custom keymaps on org blocks John Kitchin
2017-06-06 18:16 ` Nicolas Goaziou
2017-06-07 12:58   ` John Kitchin
2017-06-07 13:21     ` Nicolas Goaziou
2017-06-07 13:50       ` John Kitchin
2017-06-08  0:22         ` Grant Rettke [this message]
2017-06-10  9:03         ` Nicolas Goaziou
2017-06-10 13:58           ` John Kitchin
2017-06-10 19:31             ` John Kitchin
2018-09-05 15:52               ` Matt Price
2017-06-07  1:22 ` Grant Rettke
2017-06-07 12:49   ` John Kitchin
2017-06-07 23:52     ` Grant Rettke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAjq1mc4MYc8Tav3cpc8qBC897g9zRE8m44-0rOfoT=AudJXCQ@mail.gmail.com' \
    --to=gcr@wisdomandwonder.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    --cc=mail@nicolasgoaziou.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).