emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: shortcut keys for mark ups


From: Bernt Hansen
Subject: [Orgmode] Re: shortcut keys for mark ups
Date: Tue, 06 Jan 2009 12:48:13 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Xin Shi <address@hidden> writes:

> In org mode, are there any shortcut keys for typing the following mark-ups?
>
> #+BEGIN_EXAMPLE
> #+END_EXAMPLE

Not that I'm aware of.  You can use a function like the following to
achieve this - or maybe you can use yasnippets (I've never tried that
yet)

------------------------------------------------------------------------
(defun bth-begin-example ()
  (interactive)
  (save-excursion
    (beginning-of-line)
    (insert "#+BEGIN_EXAMPLE\n")
    (end-of-line)
    (insert "\n#+END_EXAMPLE")))


(global-set-key (kbd "<f9> e") 'bth-begin-example)
------------------------------------------------------------------------

Then you can just type <f9> e while on a line and it'll put the EXAMPLE
block around the current line.

HTH,

-Bernt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]