vimwiki/README.md

185 lines
5.7 KiB
Markdown
Raw Normal View History

2015-11-17 15:58:01 +01:00
A Personal Wiki For Vim
2013-04-21 19:19:46 +02:00
==============================================================================
[中文](README-cn.md)
2013-04-21 19:19:46 +02:00
2015-11-17 15:58:01 +01:00
![screenshot1](doc/screenshot_1.png)
![screenshot2](doc/screenshot_2.png) *
2013-04-21 19:19:46 +02:00
Intro
2015-11-17 15:58:01 +01:00
------------------------------------------------------------------------------
2013-04-21 19:19:46 +02:00
Vimwiki is a personal wiki for Vim -- a number of linked text files that have
their own syntax highlighting.
2015-11-17 15:58:01 +01:00
With Vimwiki you can:
2013-04-21 19:19:46 +02:00
2015-11-17 15:58:01 +01:00
* organize notes and ideas
* manage todo-lists
* write documentation
* maintain a diary
* export everything to HTML
2013-04-21 19:19:46 +02:00
2014-06-08 06:21:25 +02:00
To do a quick start press `<Leader>ww` (this is usually `\ww`) to go to your index
2015-11-17 15:58:01 +01:00
wiki file. By default it is located in `~/vimwiki/index.wiki`.
2013-04-21 19:19:46 +02:00
Feed it with the following example:
= My knowledge base =
* Tasks -- things to be done _yesterday_!!!
* Project Gutenberg -- good books are power.
* Scratchpad -- various temporary stuff.
2015-11-17 15:58:01 +01:00
Place your cursor on `Tasks` and press Enter to create a link. Once pressed,
`Tasks` will become `[[Tasks]]` -- a Vimwiki link. Press Enter again to
2013-04-21 19:19:46 +02:00
open it. Edit the file, save it, and then press Backspace to jump back to your
index.
2015-11-17 15:58:01 +01:00
A Vimwiki link can be constructed from more than one word. Just visually
select the words to be linked and press Enter. Try it with `Project Gutenberg`.
The result should look something like:
2013-04-21 19:19:46 +02:00
= My knowledge base =
* [[Tasks]] -- things to be done _yesterday_!!!
* [[Project Gutenberg]] -- good books are power.
* Scratchpad -- various temporary stuff.
Basic Markup
2015-11-17 15:58:01 +01:00
------------------------------------------------------------------------------
= Header1 =
== Header2 ==
=== Header3 ===
2013-04-21 19:19:46 +02:00
2015-11-17 15:58:01 +01:00
*bold* -- bold text
_italic_ -- italic text
2013-04-21 19:19:46 +02:00
2015-11-17 15:58:01 +01:00
[[wiki link]] -- wiki link
[[wiki link|description]] -- wiki link with description
2013-04-21 19:19:46 +02:00
Lists:
* bullet list item 1
- bullet list item 2
- bullet list item 3
* bullet list item 4
* bullet list item 5
* bullet list item 6
* bullet list item 7
- bullet list item 8
- bullet list item 9
2014-02-21 14:19:55 +01:00
1. numbered list item 1
2. numbered list item 2
a) numbered list item 3
b) numbered list item 4
2013-04-21 19:19:46 +02:00
2015-11-17 15:58:01 +01:00
For other syntax elements, see `:h vimwiki-syntax`
2013-04-21 19:19:46 +02:00
Key bindings
2015-11-17 15:58:01 +01:00
------------------------------------------------------------------------------
2013-04-21 19:19:46 +02:00
2015-11-17 15:58:01 +01:00
normal mode:
2013-04-21 19:19:46 +02:00
2015-11-17 15:58:01 +01:00
* `<Leader>ww` -- Open default wiki index file.
* `<Leader>wt` -- Open default wiki index file in a new tab.
* `<Leader>ws` -- Select and open wiki index file.
* `<Leader>wd` -- Delete wiki file you are in.
* `<Leader>wr` -- Rename wiki file you are in.
* `<Enter>` -- Follow/Create wiki link
* `<Shift-Enter>` -- Split and follow/create wiki link
* `<Ctrl-Enter>` -- Vertical split and follow/create wiki link
* `<Backspace>` -- Go back to parent(previous) wiki link
* `<Tab>` -- Find next wiki link
* `<Shift-Tab>` -- Find previous wiki link
2013-04-21 19:19:46 +02:00
2015-11-17 15:58:01 +01:00
For more keys, see `:h vimwiki-mappings`
2013-04-21 19:19:46 +02:00
2015-11-17 15:58:01 +01:00
Commands
------------------------------------------------------------------------------
2013-04-21 19:19:46 +02:00
2015-11-17 15:58:01 +01:00
* `:Vimwiki2HTML` -- Convert current wiki link to HTML
* `:VimwikiAll2HTML` -- Convert all your wiki links to HTML
2013-04-21 19:19:46 +02:00
* `:help vimwiki-commands` -- list all commands
* `:help vimwiki` -- General vimwiki help docs
2013-04-21 19:19:46 +02:00
Changing Wiki Syntax
------------------------------------------------------------------------------
Vimwiki currently ships with 3 syntaxes: Vimwiki (default), Markdown (markdown), and MediaWiki (media)
If you would prefer to use either Markdown or MediaWiki syntaxes, set the following option in your .vimrc:
```
let g:vimwiki_list = [{'path': '~/vimwiki/',
\ 'syntax': 'markdown', 'ext': '.md'}]
```
Installation
==============================================================================
2015-11-17 15:58:01 +01:00
Prerequisites
------------------------------------------------------------------------------
Make sure you have these settings in your vimrc file:
set nocompatible
filetype plugin on
syntax on
Without them Vimwiki will not work properly.
2017-03-27 14:47:48 +02:00
Installation using [Vim packages](http://vimhelp.appspot.com/repeat.txt.html#packages) (since Vim 7.4.1528)
------------------------------------------------------------------------------
git clone https://github.com/vimwiki/vimwiki.git ~/.vim/pack/plugins/start/vimwiki
2015-11-17 15:58:01 +01:00
Installation using [Pathogen](http://www.vim.org/scripts/script.php?script_id=2332)
------------------------------------------------------------------------------
2013-04-21 19:19:46 +02:00
cd ~/.vim
mkdir bundle
cd bundle
2015-11-17 15:58:01 +01:00
git clone https://github.com/vimwiki/vimwiki.git
Installation using [Vim-Plug](https://github.com/junegunn/vim-plug)
------------------------------------------------------------------------------
Add the following to the plugin-configuration in your vimrc:
Plug 'vimwiki/vimwiki'
Then run `:PlugInstall`.
2016-12-18 13:23:14 +01:00
Installation using [Vundle](https://github.com/VundleVim/Vundle.vim)
------------------------------------------------------------------------------
Add `Plugin 'vimwiki/vimwiki'` to your vimrc file and run
vim +PluginInstall +qall
2015-11-17 15:58:01 +01:00
Or download the [zip archive](https://github.com/vimwiki/vimwiki/archive/master.zip) and extract it in `~/.vim/bundle/`
2013-04-21 19:19:46 +02:00
2015-11-17 15:58:01 +01:00
Then launch Vim, run `:Helptags` and then `:help vimwiki` to verify it was installed.
Getting help
==============================================================================
Have a question? Visit the IRC channel `#vimwiki` on Freenode ([webchat](https://webchat.freenode.net/?channels=#vimwiki))
or post to the [mailing list](https://groups.google.com/forum/#!forum/vimwiki).
2013-04-21 19:19:46 +02:00
----
\* Screenshots made with the [solarized colorscheme](https://github.com/altercation/vim-colors-solarized)
and [lightline](https://github.com/itchyny/lightline.vim)