org-evil icon indicating copy to clipboard operation
org-evil copied to clipboard

Evil extensions for Org-mode.

#+TITLE: org-evil

  • Synopsis

Org-evil provides Org-mode extensions for Evil users.

  • Installation

The following installation methods are available:

  • [[Cask]]
  • [[Manual]]
  • [[el-get]]
  • [[MELPA]]

** Manual

To install org-evil, you need to have the following dependencies installed:

  • [[https://github.com/magnars/dash.el][dash]]
  • [[https://github.com/emacs-evil/evil][evil]]

Once you have set up these dependencies appropriately (and they are in your ~load-path~) you can add:

#+BEGIN_SRC emacs-lisp (add-to-list 'load-path "/path/to/org-evil/directory") (require 'org-evil) #+END_SRC

To your init file to enable org-evil for future sessions.

To check that org-evil is working, navigate to a buffer with org as its major mode, then run ~C-h v org-evil-mode RET~, you should see an indication that the value of the variable is ~t~.

** Cask

Simply add ~(depends-on "org-evil")~ to your =Cask= file, then run ~cask install~.

** el-get

el-get can be used to install the latest version, see https://github.com/dimitri/el-get for more information.

** MELPA

The latest version of org-evil is available from MELPA.

http://melpa.milkbox.net/#/org-evil

Follow the instructions at [[http://melpa.milkbox.net/#/getting-started][MELPA]] to enable MELPA for your system, then run ~M-x package-install RET org-evil RET~ to install org-evil.

  • Getting Started

** Moving Around

=org-evil= aims to make motion in Org intuitive for Evil users, so you can expect motions such as ~$~ to be similar to ~evil-end-of-line~, ~^~ to ~evil-first-non-blank~, and so on and so forth.

*** General Motions

The following are the default motion bindings for =org-evil-motion=, use ~M-x describe-function BINDING~ for more information on each motion.

| Key | Binding | |--------+----------------------------------------| | ~[[~ | ~org-evil-motion-backward-block-begin~ | | ~]]~ | ~org-evil-motion-forward-block-begin~ | | ~gH~ | ~org-evil-motion-up-heading-top~ | | ~gh~ | ~org-evil-motion-up-heading~ | | ~{~ | ~org-evil-motion-backward-heading~ | | ~}~ | ~org-evil-motion-forward-heading~ |

*** Block Motions

The following bindings apply when inside an Org block:

| Key | Binding | |-----+-------------------------------------| | ~(~ | ~org-evil-block-beginning-of-block~ | | ~)~ | ~org-evil-block-end-of-block~ |

*** List Motions

The following bindings apply when inside a list:

| Key | Binding | |-----+--------------------------------------------| | ~(~ | ~org-evil-list-beginning-of-previous-item~ | | ~)~ | ~org-evil-list-beginning-of-next-item~ | | ~^~ | ~org-evil-list-beginning-of-item~ |

*** Table Motions

The following bindings apply when inside an Org table:

| Key | Binding | |-------+----------------------------------------| | ~gR~ | ~org-evil-table-goto-line-from-bottom~ | | ~gc~ | ~org-evil-table-goto-column~ | | ~gr~ | ~org-evil-table-goto-line~ | | \vert | ~org-evil-table-goto-column~ |

** Operators

*** Heading Operators

The following bindings apply when at a heading:

| Key | Binding | |-----+-------------------------------------------------| | ~<~ | ~org-evil-promote~ | | ~>~ | ~org-evil-demote~ | | ~O~ | ~org-evil-heading-open-sibling-or-insert-above~ | | ~o~ | ~org-evil-heading-open-sibling-or-insert-below~ |

*** List Operators

The following bindings apply when in a list:

| Key | Binding | |-----+-------------------------------------------| | ~<~ | ~org-evil-list-outdent-item-tree~ | | ~>~ | ~org-evil-list-indent-item-tree~ | | ~O~ | ~org-evil-list-open-item-or-insert-above~ | | ~o~ | ~org-evil-list-open-item-or-insert-below~ |

*** Table Operators

The following bindings apply when inside an Org table:

| Key | Binding | |-----+------------------------------------| | ~<~ | ~org-evil-table-move-column-left~ | | ~>~ | ~org-evil-table-move-column-right~ | | ~D~ | ~org-evil-table-kill-row-to-end~ | | ~O~ | ~org-evil-table-insert-row-above~ | | ~o~ | ~org-evil-table-insert-row-below~ |

** Text Objects

*** Block Text Objects

The following text objects are enabled within an Org block:

| Key | Binding | |------+------------------------------| | ~ab~ | ~org-evil-block-a-block~ | | ~ib~ | ~org-evil-block-inner-block~ |

  • Contributing

** Testing

Before testing, first run =cask install= to ensure the appropriate dependencies are installed, then use =make test=.

  • See Also
  • [[https://github.com/Somelauw/evil-org-mode][evil-org-mode by Somelauw]] - a continuation of [[https://github.com/edwtjo/evil-org-mode][evil-org-mode by edwtjo]] with alternative bindings and functionality.