Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove evil-org for worf #9010

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 74 additions & 56 deletions layers/+emacs/org/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@
- [[#project-support][Project support]]
- [[#mode-line-support][Mode line support]]
- [[#key-bindings][Key bindings]]
- [[#org][Org]]
- [[#starting-org-applications][Starting org applications]]
- [[#org-mode][Org-mode]]
- [[#toggles][Toggles]]
- [[#org-with-evil-org-mode][Org with evil-org-mode]]
- [[#tables][Tables]]
- [[#trees][Trees]]
- [[#element-insertion][Element insertion]]
- [[#links][Links]]
- [[#emphasis][Emphasis]]
- [[#navigating-in-calendar][Navigating in calendar]]
- [[#custom-evil-bindings][Custom evil bindings]]
- [[#tables][Tables]]
- [[#trees][Trees]]
- [[#element-insertion][Element insertion]]
- [[#links][Links]]
- [[#emphasis][Emphasis]]
- [[#navigating-in-calendar][Navigating in calendar]]
- [[#capture-buffers-and-src-blocks][Capture buffers and src blocks]]
- [[#org-agenda][Org agenda]]
- [[#keybindings][Keybindings]]
Expand All @@ -40,7 +41,7 @@
This layer enables [[http://orgmode.org/][org mode]] for Spacemacs.

** Features:
- Vim inspired key bindings are provided by [[https://github.com/edwtjo/evil-org-mode][evil-org-mode]]
- Vim inspired keybindings
- Nicer bullet via [[https://github.com/sabof/org-bullets][org-bullets]]
- A [[https://cirillocompany.de/pages/pomodoro-technique][pomodoro method]] integration via [[https://github.com/lolownia/org-pomodoro][org-pomodoro]]
- Presentation mode via [[https://github.com/rlister/org-present][org-present]]
Expand Down Expand Up @@ -245,7 +246,8 @@ To permanently enable mode line display of org clock, add this snippet to your
#+END_SRC

* Key bindings
** Org

** Starting org applications

| Key Binding | Description |
|---------------+--------------------------------|
Expand All @@ -264,6 +266,40 @@ To permanently enable mode line display of org clock, add this snippet to your
| ~SPC a o t~ | org todo list |
| ~SPC C c~ | org-capture |

** Org-mode

| Key Binding | Description |
|------------------+----------------------------------------------|
| ~SPC m ,~ (note) | org’s C-c C-c (context sensitive) |
| ~SPC m *~ | org’s C-c * (context sensitive) |
| ~SPC m RET~ | org’s C-c C-RET (context sensitive) |
| ~SPC m -~ | org’s C-c - (context sensitive) |
| ~SPC m n~ | org navigation transient state |
| ~SPC m '​~ | org-edit-special |
| ~SPC m a~ | org-agenda |
| ~SPC m c~ | org-capture |
| ~SPC m C c~ | org-clock-cancel |
| ~SPC m C i~ | org-clock-in |
| ~SPC m C o~ | org-clock-out |
| ~SPC m d d~ | org-deadline |
| ~SPC m d s~ | org-schedule |
| ~SPC m d t~ | org-time-stamp |
| ~SPC m d T~ | org-time-stamp-inactive |
| ~SPC m e e~ | org-export-dispatch |
| ~SPC m e m~ | send current buffer as HTML email message |
| ~SPC m l~ | org-open-at-point |
| ~SPC m L~ | org-shiftright |
| ~SPC m H~ | org-shiftleft |
| ~SPC m K~ | org-shiftup |
| ~SPC m J~ | org-shiftdown |
| ~SPC m C-S-l~ | org-shiftcontrolright |
| ~SPC m C-S-h~ | org-shiftcontrolleft |
| ~SPC m C-S-j~ | org-shiftcontroldown |
| ~SPC m C-S-k~ | org-shiftcontrolup |
| ~SPC s j~ | spacemacs/jump-in-buffer (jump to a heading) |

Note: Assuming =dotspacemacs-leader-key= is ~,~.

** Toggles

| Key Binding | Description |
Expand All @@ -272,40 +308,20 @@ To permanently enable mode line display of org clock, add this snippet to your
| ~SPC m T t~ | org-show-todo-tree |
| ~SPC m T V~ | toggle =space-doc-mode= a read-only view mode |
| ~SPC m T x~ | org-preview-latex-fragment |
| ~SPC m T T~ | toggle todo state |

** Custom evil bindings

** Org with evil-org-mode

| Key Binding | Description |
|----------------------------------------------+----------------------------------------------|
| ~SPC m <dotspacemacs-major-mode-leader-key>~ | org-ctrl-c-ctrl-c |
| ~SPC m *~ | org-ctrl-c-star |
| ~SPC m RET~ | org-ctrl-c-ret |
| ~SPC m -~ | org-ctrl-c-minus |
| ~SPC m '​~ | org-edit-special |
| ~SPC m a~ | org-agenda |
| ~SPC m c~ | org-capture |
| ~SPC m C c~ | org-clock-cancel |
| ~SPC m C g~ | evil-org-recompute-clocks |
| ~SPC m C i~ | org-clock-in |
| ~SPC m C o~ | org-clock-out |
| ~SPC m d d~ | org-deadline |
| ~SPC m d s~ | org-schedule |
| ~SPC m d t~ | org-time-stamp |
| ~SPC m d T~ | org-time-stamp-inactive |
| ~SPC m e e~ | org-export-dispatch |
| ~SPC m e m~ | send current buffer as HTML email message |
| ~SPC m l~ | org-open-at-point |
| ~SPC m L~ | org-shiftright |
| ~SPC m H~ | org-shiftleft |
| ~SPC m K~ | org-shiftup |
| ~SPC m J~ | org-shiftdown |
| ~SPC m C-S-l~ | org-shiftcontrolright |
| ~SPC m C-S-h~ | org-shiftcontrolleft |
| ~SPC m C-S-j~ | org-shiftcontroldown |
| ~SPC m C-S-k~ | org-shiftcontrolup |
| ~SPC s j~ | spacemacs/jump-in-buffer (jump to a heading) |

*** Tables
| Key Binding | Description |
|------------------------------------+-----------------------------------------|
| ~gj~, ~gk~, ~gh~, ~gl~, ~g]~, ~g[~ | Navigate by headings |
| ~M-j~, ~M-k~, ~M-h~, ~M-l~ | Move, promote or demote headings |
| ~M-J~, ~M-K~, ~M-H~, ~M-L~ | Move, promote or demote entire subtrees |
| ~o~, ~O~ | New item below or above |
| ~M-o~, ~M-O~ | New heading below or above |
| ~M-t~, ~M-T~ | New todo heading below or above |

** Tables

| Key Binding | Description |
|---------------+----------------------------------------------------------------------------|
Expand Down Expand Up @@ -337,7 +353,7 @@ To permanently enable mode line display of org clock, add this snippet to your
| ~SPC m t t o~ | Toggle the display of Row/Column numbers in tables |
| ~SPC m t w~ | Wrap several fields in a column like a paragraph |

*** Trees
** Trees

| Key Binding | Description |
|-------------+--------------------------------------------|
Expand Down Expand Up @@ -378,7 +394,7 @@ To permanently enable mode line display of org clock, add this snippet to your
| ~SPC m s s~ | show sparse tree |
| ~SPC m s S~ | sort trees |

*** Element insertion
** Element insertion

| Key Binding | Description |
|---------------+----------------------------------|
Expand All @@ -396,13 +412,13 @@ To permanently enable mode line display of org clock, add this snippet to your
| ~SPC m i s~ | org-insert-subheading |
| ~SPC m i t~ | org-set-tags |

*** Links
** Links

| Key Binding | Description |
|-------------+-------------------|
| ~SPC m x o~ | org-open-at-point |

*** Emphasis
** Emphasis

| Key Binding | Description |
|-------------+----------------------------|
Expand All @@ -414,7 +430,7 @@ To permanently enable mode line display of org clock, add this snippet to your
| ~SPC m x u~ | make region underline |
| ~SPC m x v~ | make region verbose |

*** Navigating in calendar
** Navigating in calendar

| Key Binding | Description |
|-------------+--------------------|
Expand All @@ -431,14 +447,16 @@ To permanently enable mode line display of org clock, add this snippet to your
=org-capture-mode= and =org-src-mode= both support the confirm and abort
conventions.

| Key Binding | Description |
|----------------------------------------------+----------------------------------------|
| ~SPC m <dotspacemacs-major-mode-leader-key>~ | confirm in =org-capture-mode= |
| ~SPC m '​~ | confirm in =org-src-mode= |
| ~SPC m c~ | confirm |
| ~SPC m a~ | abort |
| ~SPC m k~ | abort |
| ~SPC m r~ | org-capture-refile in org-capture-mode |
| Key Binding | Description |
|------------------+----------------------------------------|
| ~SPC m ,~ (note) | confirm in =org-capture-mode= |
| ~SPC m '​~ | confirm in =org-src-mode= |
| ~SPC m c~ | confirm |
| ~SPC m a~ | abort |
| ~SPC m k~ | abort |
| ~SPC m r~ | org-capture-refile in org-capture-mode |

Note: Assuming =dotspacemacs-leader-key= is ~,~.

** Org agenda

Expand Down
47 changes: 47 additions & 0 deletions layers/+emacs/org/funcs.el
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,50 @@
(defun spacemacs//surround-code ()
(let ((dname (read-from-minibuffer "" "")))
(cons (format "#+BEGIN_SRC %s" (or dname "")) "#+END_SRC")))



(defun spacemacs/org-smart-open-line-below ()
"Insert new item if already in an item, otherwise, open line."
(interactive)
(end-of-visible-line)
(if (not (org-in-item-p))
(evil-open-below nil)
(org-insert-item)
(evil-append nil)))

(defun spacemacs/org-smart-open-line-above ()
"Insert new item if already in an item, otherwise, open line."
(interactive)
(end-of-visible-line)
(if (not (org-in-item-p))
(evil-open-above nil)
(org-insert-item)
(org-move-item-up)
(evil-append nil)))

(defun spacemacs/org-insert-heading-below ()
"Insert a new heading below."
(interactive)
(org-insert-heading-respect-content)
(evil-append nil))

(defun spacemacs/org-insert-heading-above ()
"Insert a new heading above."
(interactive)
(org-insert-heading-respect-content)
(org-metaup)
(evil-append nil))

(defun spacemacs/org-insert-todo-heading-below ()
"Insert a new heading below."
(interactive)
(org-insert-todo-heading-respect-content)
(evil-append nil))

(defun spacemacs/org-insert-todo-heading-above ()
"Insert a new heading above."
(interactive)
(org-insert-todo-heading-respect-content)
(org-metaup)
(evil-append nil))
Loading