Skip to content

Somelauw/evil-org-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

evil-org

https://melpa.org/packages/evil-org-badge.svg https://stable.melpa.org/packages/evil-org-badge.svg

Supplemental evil-mode key-bindings to Emacs org-mode. This project is a continuation of https://github.com/edwtjo/evil-org-mode/blob/master/evil-org.el by Edward Tjörnhammar. From version 1.3 it was taken over by Somelauw. See changelog for a history of changes.

Features

  • normal, visual and insert mode bindings
  • key bindings organised in key themes
  • operators like > and < to work on headings
  • text objects
  • table support
  • calendar (date selection) support
  • agenda support

Keybindings

Full overview of bindings and configuration

Quick overview

keyexplanation
gh, gj, gk, glnavigate between elements
vaeselect an element

Headings and items

keyexplanation
M-retinsert heading
<tab>, g TABfold / unfold headings
M-h or <<promote a heading
M-l or >>demote a heading
M-kmove subtree up
M-jmove subtree down
M-S-h or <aRpromote a subtree
M-S-l or >aRdemote a subtree
vaRselect a subtree

Tables

keyexplanation
(previous table cell
)next table cell
{beginning of table
}end of table
M-h / M-lmove table column left / right
M-k / M-jmove table column up / down
vaeselect table cell
vaEselect table row
varselect whole table

Agenda

Evil keyEmacs keyexplanation
gHMove cursor to the top of window
gMMove cursor to the middle of window
gLMove cursor to the bottom of window
<tab>, S-<return><tab>go to the corresponding entry at point
g TAB<tab>go to the corresponding entry at point
<return><return>go to the Org mode file which contains the item at point
M-<return>LDisplay Org file and center around the item
<space><space>scroll up
<delete> or <backspace><delete> or <backspace>scroll down
j, kn, pnext, previous line
gj, gk, C-j, C-kN, Pnext, previous item
[, ]b, fprevious, next week
J, K-, +, S-down, S-updown, up priority
H, LS-left, S-rightmodify date to earlier, later
ttcycle TODO keywords
M-j, M-kM-down, M-updrag line forward, backward
C-S-h, C-S-lC-S-left, C-S-rightprevious, next keyword
uC-_, C-/undo
ddC-kdelete item
daaask and archive item
dA$archive item
ct:set tags
ceeset effort
cT;set timer
iiinsert entry in diary
azadd note
AAappend to agenda
Ckcapture
mmmark
**toggle all marks
%%mark regexp
MUremove all marks
xBexecute action on marks
grrrefresh agenda
gRgrefresh all agendas
ZQxexit agenda
ZZQquit agenda
gDvtweak display (deadlines, diary, follow/log-mode, entry text, grid, day/week/year
ZD#dim blocked tasks
sc, sr, se, st, s^<, =, _, /, ^filter by category, regexp, effort, tag, top headline
S|remove all filters
ss~filter/limit interactively
IIclock in
OOclock out
cgJjump to the currently clocked in task within the agenda
ccXcancel the current running clock
crRtoggle clocktable mode in an agenda buffer
..go to today’s date
gccpop up calendar
gCCpop up date converter
p>pop up date selector
ghHpop up holiday calendar
gmMpop up phases of the moon
gsSpop up sunrise/sunset times
gtTpop up tag list
+, -[, ]manipulate the query by adding a search term with positive or negative selection

Requirements

Installation

Manual installation

mkdir -p ~/.emacs.d/plugins; git clone \
git://github.com/somelauw/evil-org-mode.git ~/.emacs.d/plugins/evil-org-mode

Configuration emacs.el

(add-to-list 'load-path "~/.emacs.d/plugins/evil-org-mode")
(require 'evil-org)
(add-hook 'org-mode-hook 'evil-org-mode)
(evil-org-set-key-theme '(navigation insert textobjects additional calendar))
(require 'evil-org-agenda)
(evil-org-agenda-set-keys)

Or you can customize evil-org-key-theme and replace the last line by:

(evil-org-set-key-theme)

Installation by use-package

(use-package evil-org
  :ensure t
  :after org
  :hook (org-mode . (lambda () evil-org-mode))
  :config
  (require 'evil-org-agenda)
  (evil-org-agenda-set-keys))

For a more elaborate setup, take a look at this example.

Common issues

In case you run Emacs in a terminal, you might find that TAB does not work as expected (being bound to evil-jump-forward instead of org-tab). You can add this to your configuration to get org-tab instead at the cost of losing C-i to jump.

(setq evil-want-C-i-jump nil)

See also

License

Gnu General Public License v3.0, http://www.gnu.org/copyleft/gpl.html