Skip to content

Instantly share code, notes, and snippets.

@homedirectory
Last active September 29, 2022 12:31
Show Gist options
  • Save homedirectory/5716de388fa6035a3262ea5ff63ecd05 to your computer and use it in GitHub Desktop.
Save homedirectory/5716de388fa6035a3262ea5ff63ecd05 to your computer and use it in GitHub Desktop.
vimwiki cheatsheet

vimwiki cheatsheet

Taken from http://thedarnedestthing.com/vimwiki%20cheatsheet

[n] is relative wiki order as defined in .vimrc, default 1.

wiki management

keys action
[n] <leader>ww open wiki index file
[n] <leader>wt open wiki index file in new tab
<leader>ws list and select available wikis
<leader>wd delete wiki page
<leader>wr rename wiki page

diary management

keys action
[n] <leader>wi open diary index file for wiki
<leader>w <leader>i update current diary index
[n] <leader>w <leader>w open today’s diary file for wiki
[n] <leader>w <leader>t open today’s diary file for wiki in new tab
<C-Up> open previous day’s diary
<C-Down> open next day’s diary

navigation

keys action
<CR> follow/create wiki link
<C-S-CR> follow/create wiki link in new tab
<backspace> go back to previous wiki page
<Tab> go to next link on current page
<S-Tab> go to previous link on current page

editing shortcuts

keys action
<C-Space> toggle list item on/off
= add header level
- remove header level
+ create/decorate links
glm increase indent of list item
gll decrease indent of list item
gl* OR gl8 switch or insert “*” symbol
gl# OR gl3 switch or insert “#” symbol
gl- switch or insert “-“ symbol
gl1 switch or insert “1.” symbol

table shortcuts

keys action
<A-Left> move column left
<A-right> move column right
<CR> (insert mode) go down/create cell
<Tab> (insert mode) go next/create cell
gqq OR gww reformat table

text objects

object meaning
ah section between 2 headings including empty trailing lines
ih section between 2 headings excluding empty trailing lines
a\ table cell
i\ inner table cell
ac table column
ic inner table column
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment