forked from chimeric/dokuvimki
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdokuvimki.txt
258 lines (163 loc) · 9.96 KB
/
dokuvimki.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
*dokuvimki* Plugin for editing DokuWiki pages via XML-RPC for Vim > 7.0
By Michael Klier <[email protected]>
and Florian Rathgeber <[email protected]>
*dokuvimki-plugin*
------------------------------------------------------------------------------
OVERVIEW *dokuvimki-overview*
|dokuvimki-installation| Installation instructions
|dokuvimki-configuration| How to configure dokuvimki
|dokuvimki-commands| Brief description of the available commands
|dokuvimki-buffer-mappings| Description of the mappings available in the
special buffers
|dokuvimki-bugs| Bug reports are always welcome ;-)
------------------------------------------------------------------------------
UPDATES *dokuvimki-updates*
The official releases can be found at:
git: https://github.com/kynan/dokuvimki
------------------------------------------------------------------------------
INSTALLATION *dokuvimki-installation*
The recommended way to install DokuVimKi is via a Vim plugin manager like
`vim-plug` (https://github.com/junegunn/vim-plug) or `pathogen.vim`
(https://github.com/tpope/vim-pathogen).
For `vim-plug`, add the following to the vim-plug section of your `~/.vimrc`,
which enables the DokuVimKi plugin only when first connecting to a DokuWiki:
Plug 'kynan/dokuvimki', {'on': 'DokuVimKi'}
For `pathogen.vim`, simply run the following:
cd ~/.vim/bundle
git clone git://github.com/kynan/dokuvimki
Alternatively, download the plugin and unpack it in your `~/.vim/` folder.
vim needs to be compiled with Python support
(http://vimdoc.sourceforge.net/htmldoc/if_pyth.html), which should be the case
for most distributions e.g. `vim-gnome` or `vim-gtk` on Debian/Ubuntu.
The `dokuwikixmlrpc` (https://pypi.org/project/dokuwikixmlrpc) Python module
needs to be installed. Install it with:
pip install dokuwikixmlrpc
Note that Vim will use the Python interpreter it was built with (if you have
not built Vim yourself this will be your system Python) and you will need to
install it for that interpreter. To use a virtualenv you need a Vim plugin
like `virtualenv.vim` (https://github.com/plytophogy/vim-virtualenv).
You'll also have to install a recent development version of DokuWiki
(https://dokuwiki.org) itself in order to use this plugin! For details on how
to setup XMLRPC for DokuWiki please refer to https://dokuwiki.org/devel:xmlrpc.
------------------------------------------------------------------------------
CONFIGURATION *dokuvimki-configuration*
The following variables have to be present in your `~/.vimrc` in order to get
DokuVimKi working.
g:DokuVimKi_USER The username used to login into the remote wiki.
g:DokuVimKi_PASS The password used to login into the remote wiki.
g:DokuVimKi_PASS_EVAL Call an external program to get the password.
E.g. GNU pass.
g:DokuVimKi_URL The URL of the remote wiki (no trailing slash!).
The following variables are optional and have a default:
g:DokuVimKi_HTTP_BASIC_AUTH Use HTTP basic auth (default off). Set this to
anything but the empty string to enable.
g:DokuVimKi_IMG_SUB_NS The default namespace where an image should be
uploaded when pasting from the clipboard (default
images).
g:DokuVimKi_INDEX_WINWIDTH The width of the index window (default 30).
g:DokuVimKi_DEFAULT_SUM Default summary used if no summary is given on
save. Defaults to [xmlrpc dokuvimki edit].
If you save pages using :w this is used as well
and will result in a minor edit.
A good idea is to outsource your DokuVimKi configuration. To do so, store your
settings in a seperate file like `~/.vim/dokuvimkirc`. You can increase
security be setting the file permission properly:
chmod 600 ~/.vim/dokuvimkirc
To include this file in your `~/.vimrc` use following code:
" Include DokuVimKi Configuration
if filereadable("~/.vim/dokuvimkirc")
source ~/.vim/dokuvimkirc
endif
------------------------------------------------------------------------------
COMMANDS *dokuvimki-commands*
:DokuVimKi Launches DokuVimKi with the options from above.
:DWedit <page> Opens the given wiki page in the edit buffer. If
the page does not exist on the remote wiki it will
be created once you issue :DWSave. You can use
<TAB> to autocomplete pages. If the page doesn't
contain any ':' the page will be created in the
current namespace the index is showing.
:DWcd <namespace> Change into a given namespace.
:DWsave <summary> Save the wiki page in the edit buffer to the
remote wiki. If no edit summary is given it
will be saved as minor edit. You can also use :w
but it will not allow to specify a edit summary.
:DWbackLinks <page> Loads a list of pages which link back to the given
wiki page into the edit buffer. If you are already
editing a page you can use the command without
supplying a wiki page and it will load a list of
backlinks to the page loaded in the edit buffer.
You can use <TAB> to autocomplete pages.
:DWrevisions <page> N Lists the available revisions of a wiki page. You
can use an offset (integer) to view earlier
revisions. The number of shown revisions depends
on the $conf['recent'] setting of the remote wiki.
You can use <TAB> to autocomplete pages.
:DWsearch <pattern> Searches for matching pages. You can use regular
expressions!
:DWmediasearch <pattern> Searches for matching media files. You can use
regular expressions.
:DWchanges <timeframe> Lists the recent changes of the remote wiki.
You can specify a timeframe:
Nd show changes of the last N days
Nw show changes of the last N weeks
:DWclose Closes the current edit buffer (removing edit
:DWclose! locks on the remote wiki etc.) - if the buffer
contains changes which haven't been synced back
to the remote wiki this command will issue a
warning. You can also use :close which is setup
as abbreviation.
:DWdiffclose Closes diff mode
:DWupload <file> Allows to upload a file in the current namespace.
:DWupload! <file>
:DWpasteimage Upload an image from the clipboard to the remote
wiki and paste the media link into the buffer.
:DWpasteimageAfer The same as DWpasteimage but paste the link after
the cursor.
:DWquit Quits the current session and quits vim. This will
:DWquit! fail if there are unsaved changes.
:DWhelp Displays the DokuVimKi help.
------------------------------------------------------------------------------
EDIT-MAPPINGS *dokuvimki-edit-mappings*
DokuVimKi mimics the functionality of DokuWikis edit toolbar to make it easier
to insert/edit wiki syntax. These mappings work only in insert mode:
<C-D><C-B> inserts bold syntax
<C-D><C-I> inserts italic syntax
<C-D><C-U> inserts underline syntax
<C-D><C-L> inserts link syntax
<C-D><C-M> inserts media syntax
<C-D><C-K> inserts code block syntax
<C-D><C-F> inserts file block syntax
<C-D><C-H> inserts a headline
<C-I><C-P> increases the current headline level by one
<C-I><C-D> decreases the current headline level by one
This mapping only works in normal mode:
<C-]> opens a link under the current cursor position for editing
------------------------------------------------------------------------------
BUFFER-MAPPINGS *dokuvimki-buffer-mappings*
DokuVimKi comes with some specials mappings you can use in the special buffers
like the index or the recent changes view.
INDEX
<ENTER> Opens the page for editing, or lists the contents of the
namespace under the cursor.
b Shows a list of the page linking back to the page under the
cursor.
r Shows the revisions of page under the cursor.
REVISIONS
<ENTER> Opens the page revision for editing.
d Opens the diff view for the page and the revision under the
cursor.
CHANGES
<ENTER> Opens the page revision under the cursor for editing.
SEARCH
<ENTER> Opens the page under the cursor for editing.
BACKLINKS
<ENTER> Opens the page under the cursor for editing.
------------------------------------------------------------------------------
BUGS *dokuvimki-bugs*
Please use the official bug tracker for feature requests of bug reports:
>
https://github.com/kynan/dokuvimki/issues
If the bug is reproducible, then it will be of great help if a short
description of the events leading to the bug are also given ;-).
vim:tw=78:et:ts=4:ft=help:norl: