[org] support rich insert of code from other buffers (org-rich-yank) (#13960)

This commit is contained in:
Keith Pinson 2020-09-18 14:00:00 -04:00 committed by GitHub
parent 26a9f51dff
commit d4668c519f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 2 deletions

View File

@ -2685,6 +2685,7 @@ Other:
- Added shortcuts for handling scheduled entries (thanks to Daniel Nicolai)
- Added package for =org-sticky-header-mode= (thanks to Langston Barret)
- Added package =org-jira= (thanks to Kirill A. Korinsky)
- Added package =org-rich-yank= (thanks to Keith Pinson)
- Key bindings:
- ~SPC m T i~ to toggle inline images
- Move clock related key bindings to ~SPC a o C~

View File

@ -69,6 +69,7 @@ This layer enables [[http://orgmode.org/][org mode]] for Spacemacs.
- Insertion of images via [[https://github.com/abo-abo/org-download][org-download]]
- Project-specific TODOs via [[https://github.com/IvanMalison/org-projectile][org-projectile]]
- Easy insert of URLs from clipboard with org format via [[https://github.com/rexim/org-cliplink][org-cliplink]]
- Rich insert of code (into a source block with highlighting, and a link) from other buffers via [[https://github.com/unhammer/org-rich-yank][org-rich-yank]]
* BibTeX
For more extensive support of references through BibTeX files, have a look at
@ -520,8 +521,8 @@ are also available.
** Element insertion
| Key binding | Description |
|---------------+-----------------------------------------------|
| Key binding | Description |
|-------------+-----------------------------------------------|
| ~C-RET~ | Insert heading at end of current subtree |
| ~C-S-RET~ | Insert TODO heading at end of current subtree |
| ~SPC m i d~ | org-insert-drawer |
@ -537,6 +538,7 @@ are also available.
| ~SPC m i L~ | insert URL with its page title from clipboard |
| ~SPC m i n~ | org-add-note |
| ~SPC m i p~ | org-set-property |
| ~SPC m i r~ | org-rick-yank (paste code into a =src= block) |
| ~SPC m i s~ | org-insert-subheading |
| ~SPC m i t~ | org-set-tags |

View File

@ -32,6 +32,7 @@
org-pomodoro
org-present
org-cliplink
org-rich-yank
(org-projectile :requires projectile)
(ox-epub :toggle org-enable-epub-support)
(ox-twbs :toggle org-enable-bootstrap-support)
@ -705,6 +706,15 @@ Headline^^ Visit entry^^ Filter^^ Da
(spacemacs/set-leader-keys-for-major-mode 'org-mode
"iL" 'org-cliplink)))
(defun org/init-org-rich-yank ()
(use-package org-rich-yank
:defer t
:init
(spacemacs/set-leader-keys-for-major-mode 'org-mode
;; yank is a misnomer for this function which actually puts/pastes
;; ir = "insert rich"
"ir" 'org-rich-yank)))
(defun org/init-org-projectile ()
(use-package org-projectile
:commands (org-projectile-location-for-project)