目录

Vim的Dokuwiki快捷键配置

Vim和Dokuwiki的完美结合,让你用Vim写Dokuwiki更爽。

使用方法

把下面的vim map代码写入文件

使用的使用直接用:source dokuwiki-keys.vim导入快捷键map。

也可以直接将mapping代码写入到.vimrc中。

Vim的Dokuwiki快捷键

vmap <c-b> "zdi**<c-r>z**
imap <c-b> **  **<esc>2hi
vmap <c-i> "zdi//<c-r>z//
imap <c-i> //  //<esc>2hi
vmap <c-u> "zdi__<c-r>z__
imap <c-u> __  __<esc>2hi
vmap <c-t> "zdi''<c-r>z''
imap <c-t> ''  ''<esc>2hi
vmap <c-s> "zdi<c-v><del><c-r>z</del>
imap <c-s> <c-v><del></del><esc>5hi
vmap <c-l> "zdi[[<c-r>z]]
imap <c-l> [[]]<esc>2ha
vmap <a-1> "zdi======= <c-r>z =======
imap <a-1> =======  =======<esc>7hi
vmap <a-2> "zdi====== <c-r>z ======
imap <a-2> ======  ======<esc>6hi
vmap <a-3> "zdi===== <c-r>z =====
imap <a-3> =====  =====<esc>5hi
vmap <a-4> "zdi==== <c-r>z ====
imap <a-4> ====  ====<esc>4hi
vmap <a-5> "zdi=== <c-r>z ===
imap <a-5> ===  ===<esc>3hi
vmap <a-6> "zdi== <c-r>z ==
imap <a-6> ==  ==<esc>3hi
nmap <F2> :s/.*/  * &/
imap <F2> <space><space>*<space>
nmap <F3> :s/.*/  - &/
imap <F3> <space><space>-<space>

增大/减小 标题Level

" Increase heading by one level
imap == <Home>=<End>= <BS>
" Decrease heading by one level
imap =- <Home><Del><End><BS>

参考