First webinar on reproducible research: litterate programming
Here are a few convenient emacs shortcuts for those that have never
used emacs. In all of the emacs shortcuts, C=Ctrl
, M=Alt/Esc
and
S=Shift
. Note that you may want to use two hours to follow the emacs
tutorial (C-h t
). In the configuration file CUA keys have been
activated and allow you to use classical copy/paste (C-c/C-v
)
shortcuts. This can be changed from the Options menu.
C-x C-c
exitC-x C-s
save bufferC-g
panic mode ;) type this whenever you want to exit an awful series of shortcutsC-Space
start selection marker although selection with shift and arrows should work as wellC-l
reposition the screenC-_
(orC-z
if CUA keys have been activated)C-s
searchM-%
replaceC-x C-h
get the list of emacs shortcutsC-c C-h
get the list of emacs shortcuts considering the mode you are currently using (e.g., C, Lisp, org, …)
There are a bunch of cheatsheets also available out there (e.g., this one for emacs and this one for org-mode or this graphical one).
Many emacs shortcuts start by C-x
. Org-mode’s shortcuts generaly
start with C-c
.
Tab
fold/unfoldC-c c
capture (finish capturing withC-c C-c
, this is explained on the top of the buffer that just opened)C-c C-c
do something useful here (tag, execute, …)C-c C-o
open linkC-c C-t
switch todoC-c C-e
exportM-Enter
new item/sectionC-c a
agenda (try theL
option)C-c C-a
attach filesC-c C-d
set a deadl1ine (useS-arrows
to navigate in the dates)A-arrows
move subtree (add shift for the whole subtree)
<s + tab
template for source bloc. You can easily adapt it to get this:ls
Now if you
C-c C-c
, it will execute the block.#+RESULTS: | #journal.org# | | journal.html | | journal.org | | journal.org~ |
- Source blocks have many options (formatting, arguments, names,
sessions,…), which is why I have my own shortcuts
<b + tab
bash block (orB
for sessions).ls /tmp/*201*.pdf #+RESULTS: : /tmp/2015_02_bordeaux_otl_tutorial.pdf : /tmp/2015-ASPLOS.pdf : /tmp/2015-Europar-Threadmap.pdf : /tmp/europar2016-1.pdf : /tmp/europar2016.pdf : /tmp/M2-PDES-planning-examens-janvier2016.pdf
- I have defined many such templates in my configuration. You can
give a try to
<r
,<R
,<RR
,<g
,<p
,<P
,<m
… - Some of these templates are not specific to babel: e.g.,
<h
,<l
,<L
,<c
,<e
, …
****