Version 1.1
* NEW: Issue 57: Make it possible to have pre block inside list item. * NEW: Issue 82: Add quick goto command. See |:VimwikiGoto|. * NEW: Issue 83: Quick switch in diary. See |:VimwikiDiaryNextDay| and |:VimwikiDiaryPrevDay| commands. * FIX: Issue 84: Vimwiki rename removed the WikiWord display name. * FIX: Issue 85: Errors if you have '~' subdirectory in a wiki directory. * FIX: Issue 86: Existed links '[[WikiLink1|Alias1]] | [[WikiLink2]]' are highlighted as a single link. * FIX: Issue 88: Underline text. See |g:vimwiki_valid_html_tags|. * FIX: Issue 92: Wikies in a subdir could be renamed to an empty file. * FIX: Issue 93: Use alias name in html title. See |vimwiki-title|. * FIX: Issue 94: Relative links to PHP files are broken. See |g:vimwiki_file_exts| for details. * FIX: Issue 96: Closing bracket at the end of weblink shouldn't be a part of that link. * FIX: Issue 97: Error opening weblink in a browser if it has # inside. * FIX: Issue 99: Vim is not responing while opening arbitrary wiki file. * FIX: Issue 100: Additional content on diary index page could be corrupted. * NEW: Issue 101: Customized HTML tags. See |g:vimwiki_valid_html_tags| * NEW: Issue 102: Conceal feature usage. See |g:vimwiki_conceallevel|. * FIX: Issue 103: Always highlight links to non-wiki files as existed. * FIX: Issue 104: vimwiki#nested_syntax needs 'keepend' to avoid contained language syntax eat needed '}}}'. * FIX: Issue 105: <i_CR> on a todo list item with [ ] doesn't create new todo list item. * FIX: Issue 106: With MediaWiki syntax <C-Space> on a child todo list item produce errors. * FIX: Issue 107: With MediaWiki syntax <C-Space> on a list item creates todo list item without space between * and [ ]. * FIX: Issue 110: Syntax highlighting doesn't work for indented codeblock. * FIX: Issue 115: Nested Perl syntax highlighting differs from regular one. * MISC: Many vimwiki commands were renamed from Vimwiki.*Word to Vimwiki.*Link. VimwikiGoHome is renamed to VimwikiIndex, VimwikiTabGoHome to VimwikiTabIndex. * MISC: vimwiki-option-gohome is removed.
This commit is contained in:
@ -21,6 +21,11 @@ let b:undo_ftplugin = "setlocal ".
|
||||
|
||||
setlocal autowriteall
|
||||
setlocal commentstring=<!--%s-->
|
||||
|
||||
if g:vimwiki_conceallevel && exists("+conceallevel")
|
||||
let &conceallevel = g:vimwiki_conceallevel
|
||||
endif
|
||||
|
||||
" MISC }}}
|
||||
|
||||
" GOTO FILE: gf {{{
|
||||
@ -38,32 +43,22 @@ else
|
||||
endif
|
||||
setlocal formatoptions=tnro
|
||||
|
||||
inoremap <buffer> <expr> <CR> vimwiki_lst#insertCR()
|
||||
nnoremap <buffer> o :call vimwiki_lst#insertOo('o')<CR>a
|
||||
nnoremap <buffer> O :call vimwiki_lst#insertOo('O')<CR>a
|
||||
|
||||
if !empty(&langmap)
|
||||
" Valid only if langmap is a comma separated pairs of chars
|
||||
let l_o = matchstr(&langmap, '\C,\zs.\zeo,')
|
||||
if l_o
|
||||
exe 'nnoremap <buffer> '.l_o.' :call vimwiki_lst#insertOo("o")<CR>a'
|
||||
exe 'nnoremap <buffer> '.l_o.' :call vimwiki_lst#kbd_oO("o")<CR>a'
|
||||
endif
|
||||
|
||||
let l_O = matchstr(&langmap, '\C,\zs.\zeO,')
|
||||
if l_O
|
||||
exe 'nnoremap <buffer> '.l_O.' :call vimwiki_lst#insertOo("O")<CR>a'
|
||||
exe 'nnoremap <buffer> '.l_O.' :call vimwiki_lst#kbd_oO("O")<CR>a'
|
||||
endif
|
||||
endif
|
||||
|
||||
" COMMENTS }}}
|
||||
|
||||
" FOLDING for headers and list items using expr fold method. {{{
|
||||
if g:vimwiki_folding == 1
|
||||
setlocal fdm=expr
|
||||
setlocal foldexpr=VimwikiFoldLevel(v:lnum)
|
||||
setlocal foldtext=VimwikiFoldText()
|
||||
endif
|
||||
|
||||
function! VimwikiFoldLevel(lnum) "{{{
|
||||
let line = getline(a:lnum)
|
||||
|
||||
@ -208,14 +203,14 @@ command! -buffer Vimwiki2HTML
|
||||
command! -buffer VimwikiAll2HTML
|
||||
\ call vimwiki_html#WikiAll2HTML(expand(VimwikiGet('path_html')))
|
||||
|
||||
command! -buffer VimwikiNextWord call vimwiki#WikiNextWord()
|
||||
command! -buffer VimwikiPrevWord call vimwiki#WikiPrevWord()
|
||||
command! -buffer VimwikiDeleteWord call vimwiki#WikiDeleteWord()
|
||||
command! -buffer VimwikiRenameWord call vimwiki#WikiRenameWord()
|
||||
command! -buffer VimwikiFollowWord call vimwiki#WikiFollowWord('nosplit')
|
||||
command! -buffer VimwikiGoBackWord call vimwiki#WikiGoBackWord()
|
||||
command! -buffer VimwikiSplitWord call vimwiki#WikiFollowWord('split')
|
||||
command! -buffer VimwikiVSplitWord call vimwiki#WikiFollowWord('vsplit')
|
||||
command! -buffer VimwikiNextLink call vimwiki#find_next_link()
|
||||
command! -buffer VimwikiPrevLink call vimwiki#find_prev_link()
|
||||
command! -buffer VimwikiDeleteLink call vimwiki#delete_link()
|
||||
command! -buffer VimwikiRenameLink call vimwiki#rename_link()
|
||||
command! -buffer VimwikiFollowLink call vimwiki#follow_link('nosplit')
|
||||
command! -buffer VimwikiGoBackLink call vimwiki#go_back_link()
|
||||
command! -buffer VimwikiSplitLink call vimwiki#follow_link('split')
|
||||
command! -buffer VimwikiVSplitLink call vimwiki#follow_link('vsplit')
|
||||
|
||||
command! -buffer -range VimwikiToggleListItem call vimwiki_lst#ToggleListItem(<line1>, <line2>)
|
||||
|
||||
@ -227,6 +222,8 @@ exe 'command! -buffer -nargs=* VimwikiSearch vimgrep <args> '.
|
||||
exe 'command! -buffer -nargs=* VWS vimgrep <args> '.
|
||||
\ escape(VimwikiGet('path').'**/*'.VimwikiGet('ext'), ' ')
|
||||
|
||||
command! -buffer -nargs=1 VimwikiGoto call vimwiki#goto("<args>")
|
||||
|
||||
" table commands
|
||||
command! -buffer -nargs=* VimwikiTable call vimwiki_tbl#create(<f-args>)
|
||||
command! -buffer VimwikiTableAlignQ call vimwiki_tbl#align_or_cmd('gqq')
|
||||
@ -234,65 +231,69 @@ command! -buffer VimwikiTableAlignW call vimwiki_tbl#align_or_cmd('gww')
|
||||
command! -buffer VimwikiTableMoveColumnLeft call vimwiki_tbl#move_column_left()
|
||||
command! -buffer VimwikiTableMoveColumnRight call vimwiki_tbl#move_column_right()
|
||||
|
||||
" diary commands
|
||||
command! -buffer VimwikiDiaryNextDay call vimwiki_diary#goto_next_day()
|
||||
command! -buffer VimwikiDiaryPrevDay call vimwiki_diary#goto_prev_day()
|
||||
|
||||
" COMMANDS }}}
|
||||
|
||||
" KEYBINDINGS {{{
|
||||
if g:vimwiki_use_mouse
|
||||
nmap <buffer> <S-LeftMouse> <NOP>
|
||||
nmap <buffer> <C-LeftMouse> <NOP>
|
||||
noremap <silent><buffer> <2-LeftMouse> :VimwikiFollowWord<CR>
|
||||
noremap <silent><buffer> <S-2-LeftMouse> <LeftMouse>:VimwikiSplitWord<CR>
|
||||
noremap <silent><buffer> <C-2-LeftMouse> <LeftMouse>:VimwikiVSplitWord<CR>
|
||||
noremap <silent><buffer> <RightMouse><LeftMouse> :VimwikiGoBackWord<CR>
|
||||
noremap <silent><buffer> <2-LeftMouse> :VimwikiFollowLink<CR>
|
||||
noremap <silent><buffer> <S-2-LeftMouse> <LeftMouse>:VimwikiSplitLink<CR>
|
||||
noremap <silent><buffer> <C-2-LeftMouse> <LeftMouse>:VimwikiVSplitLink<CR>
|
||||
noremap <silent><buffer> <RightMouse><LeftMouse> :VimwikiGoBackLink<CR>
|
||||
endif
|
||||
|
||||
if !hasmapto('<Plug>VimwikiFollowWord')
|
||||
nmap <silent><buffer> <CR> <Plug>VimwikiFollowWord
|
||||
if !hasmapto('<Plug>VimwikiFollowLink')
|
||||
nmap <silent><buffer> <CR> <Plug>VimwikiFollowLink
|
||||
endif
|
||||
noremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiFollowWord :VimwikiFollowWord<CR>
|
||||
\ <Plug>VimwikiFollowLink :VimwikiFollowLink<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiSplitWord')
|
||||
nmap <silent><buffer> <S-CR> <Plug>VimwikiSplitWord
|
||||
if !hasmapto('<Plug>VimwikiSplitLink')
|
||||
nmap <silent><buffer> <S-CR> <Plug>VimwikiSplitLink
|
||||
endif
|
||||
noremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiSplitWord :VimwikiSplitWord<CR>
|
||||
\ <Plug>VimwikiSplitLink :VimwikiSplitLink<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiVSplitWord')
|
||||
nmap <silent><buffer> <C-CR> <Plug>VimwikiVSplitWord
|
||||
if !hasmapto('<Plug>VimwikiVSplitLink')
|
||||
nmap <silent><buffer> <C-CR> <Plug>VimwikiVSplitLink
|
||||
endif
|
||||
noremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiVSplitWord :VimwikiVSplitWord<CR>
|
||||
\ <Plug>VimwikiVSplitLink :VimwikiVSplitLink<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiGoBackWord')
|
||||
nmap <silent><buffer> <BS> <Plug>VimwikiGoBackWord
|
||||
if !hasmapto('<Plug>VimwikiGoBackLink')
|
||||
nmap <silent><buffer> <BS> <Plug>VimwikiGoBackLink
|
||||
endif
|
||||
noremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiGoBackWord :VimwikiGoBackWord<CR>
|
||||
\ <Plug>VimwikiGoBackLink :VimwikiGoBackLink<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiNextWord')
|
||||
nmap <silent><buffer> <TAB> <Plug>VimwikiNextWord
|
||||
if !hasmapto('<Plug>VimwikiNextLink')
|
||||
nmap <silent><buffer> <TAB> <Plug>VimwikiNextLink
|
||||
endif
|
||||
noremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiNextWord :VimwikiNextWord<CR>
|
||||
\ <Plug>VimwikiNextLink :VimwikiNextLink<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiPrevWord')
|
||||
nmap <silent><buffer> <S-TAB> <Plug>VimwikiPrevWord
|
||||
if !hasmapto('<Plug>VimwikiPrevLink')
|
||||
nmap <silent><buffer> <S-TAB> <Plug>VimwikiPrevLink
|
||||
endif
|
||||
noremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiPrevWord :VimwikiPrevWord<CR>
|
||||
\ <Plug>VimwikiPrevLink :VimwikiPrevLink<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiDeleteWord')
|
||||
nmap <silent><buffer> <Leader>wd <Plug>VimwikiDeleteWord
|
||||
if !hasmapto('<Plug>VimwikiDeleteLink')
|
||||
nmap <silent><buffer> <Leader>wd <Plug>VimwikiDeleteLink
|
||||
endif
|
||||
noremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiDeleteWord :VimwikiDeleteWord<CR>
|
||||
\ <Plug>VimwikiDeleteLink :VimwikiDeleteLink<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiRenameWord')
|
||||
nmap <silent><buffer> <Leader>wr <Plug>VimwikiRenameWord
|
||||
if !hasmapto('<Plug>VimwikiRenameLink')
|
||||
nmap <silent><buffer> <Leader>wr <Plug>VimwikiRenameLink
|
||||
endif
|
||||
noremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiRenameWord :VimwikiRenameWord<CR>
|
||||
\ <Plug>VimwikiRenameLink :VimwikiRenameLink<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiToggleListItem')
|
||||
nmap <silent><buffer> <C-Space> <Plug>VimwikiToggleListItem
|
||||
@ -304,10 +305,35 @@ endif
|
||||
noremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiToggleListItem :VimwikiToggleListItem<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiDiaryNextDay')
|
||||
nmap <silent><buffer> <C-Down> <Plug>VimwikiDiaryNextDay
|
||||
endif
|
||||
noremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiDiaryNextDay :VimwikiDiaryNextDay<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiDiaryPrevDay')
|
||||
nmap <silent><buffer> <C-Up> <Plug>VimwikiDiaryPrevDay
|
||||
endif
|
||||
noremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiDiaryPrevDay :VimwikiDiaryPrevDay<CR>
|
||||
|
||||
function! s:CR() "{{{
|
||||
let res = vimwiki_lst#kbd_cr()
|
||||
if res == "\<CR>" && g:vimwiki_table_auto_fmt
|
||||
let res = vimwiki_tbl#kbd_cr()
|
||||
endif
|
||||
return res
|
||||
endfunction "}}}
|
||||
|
||||
" List and Table <CR> mapping
|
||||
inoremap <buffer> <expr> <CR> <SID>CR()
|
||||
|
||||
" List mappings
|
||||
nnoremap <buffer> o :call vimwiki_lst#kbd_oO('o')<CR>a
|
||||
nnoremap <buffer> O :call vimwiki_lst#kbd_oO('O')<CR>a
|
||||
|
||||
" Table mappings
|
||||
if g:vimwiki_table_auto_fmt
|
||||
inoremap <expr> <buffer> <CR> vimwiki_tbl#kbd_cr()
|
||||
inoremap <expr> <buffer> <Tab> vimwiki_tbl#kbd_tab()
|
||||
inoremap <expr> <buffer> <S-Tab> vimwiki_tbl#kbd_shift_tab()
|
||||
endif
|
||||
|
Reference in New Issue
Block a user