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:
Maxim Kim
2010-08-24 00:00:00 +00:00
committed by Able Scraper
parent 8e53e53ffe
commit 458c4539e5
11 changed files with 784 additions and 368 deletions

View File

@ -72,7 +72,7 @@ function! s:setup_buffer_enter() "{{{
endif
if idx == -1
call add(g:vimwiki_list, {'path': path, 'ext': ext})
call add(g:vimwiki_list, {'path': path, 'ext': ext, 'temp': 1})
let g:vimwiki_current_idx = len(g:vimwiki_list) - 1
else
let g:vimwiki_current_idx = idx
@ -81,52 +81,29 @@ function! s:setup_buffer_enter() "{{{
let b:vimwiki_idx = g:vimwiki_current_idx
endif
call s:setup_colors()
if &filetype != 'vimwiki'
setlocal ft=vimwiki
else
setlocal syntax=vimwiki
endif
" Update existed/non-existed links highlighting.
call vimwiki#highlight_links()
" Settings foldmethod, foldexpr and foldtext are local to window. Thus in a
" new tab with the same buffer folding is reset to vim defaults. So we
" insist vimwiki folding here.
" TODO: remove the same from ftplugin.
if g:vimwiki_folding == 1 && &fdm != 'expr'
setlocal fdm=expr
setlocal foldexpr=VimwikiFoldLevel(v:lnum)
setlocal foldtext=VimwikiFoldText()
endif
" And conceal level too.
if g:vimwiki_conceallevel && exists("+conceallevel")
let &conceallevel = g:vimwiki_conceallevel
endif
" Set up menu
if g:vimwiki_menu != ""
exe 'nmenu enable '.g:vimwiki_menu.'.Table'
endif
endfunction "}}}
function! s:setup_colors()"{{{
if g:vimwiki_hl_headers == 0
return
endif
if &background == 'light'
hi def VimwikiHeader1 guibg=bg guifg=#aa5858 gui=bold ctermfg=DarkRed
hi def VimwikiHeader2 guibg=bg guifg=#309010 gui=bold ctermfg=DarkGreen
hi def VimwikiHeader3 guibg=bg guifg=#1030a0 gui=bold ctermfg=DarkBlue
hi def VimwikiHeader4 guibg=bg guifg=#103040 gui=bold ctermfg=Black
hi def VimwikiHeader5 guibg=bg guifg=#001020 gui=bold ctermfg=Black
hi def VimwikiHeader6 guibg=bg guifg=#000000 gui=bold ctermfg=Black
else
hi def VimwikiHeader1 guibg=bg guifg=#e08090 gui=bold ctermfg=Red
hi def VimwikiHeader2 guibg=bg guifg=#80e090 gui=bold ctermfg=Green
hi def VimwikiHeader3 guibg=bg guifg=#6090e0 gui=bold ctermfg=Blue
hi def VimwikiHeader4 guibg=bg guifg=#c0c0f0 gui=bold ctermfg=White
hi def VimwikiHeader5 guibg=bg guifg=#e0e0f0 gui=bold ctermfg=White
hi def VimwikiHeader6 guibg=bg guifg=#f0f0f0 gui=bold ctermfg=White
endif
endfunction"}}}
" OPTION get/set functions {{{
" return value of option for current wiki or if second parameter exists for
" wiki with a given index.
@ -201,11 +178,13 @@ let s:vimwiki_defaults.index = 'index'
let s:vimwiki_defaults.ext = '.wiki'
let s:vimwiki_defaults.maxhi = 1
let s:vimwiki_defaults.syntax = 'default'
let s:vimwiki_defaults.gohome = 'split'
let s:vimwiki_defaults.html_header = ''
let s:vimwiki_defaults.html_footer = ''
let s:vimwiki_defaults.nested_syntaxes = {}
let s:vimwiki_defaults.auto_export = 0
" is wiki temporary -- was added to g:vimwiki_list by opening arbitrary wiki
" file.
let s:vimwiki_defaults.temp = 0
" diary
let s:vimwiki_defaults.diary_rel_path = 'diary/'
@ -265,9 +244,12 @@ call s:default('table_auto_fmt', 1)
call s:default('w32_dir_enc', '')
call s:default('CJK_length', 0)
call s:default('dir_link', '')
call s:default('file_exts', 'pdf,txt,doc,rtf,xls,php,zip,rar,7z,html,gz')
call s:default('valid_html_tags', 'b,i,s,u,sub,sup,kbd,br,hr')
call s:default('html_header_numbering', 0)
call s:default('html_header_numbering_sym', '')
call s:default('conceallevel', 3)
call s:default('current_idx', 0)
@ -292,7 +274,8 @@ else
endif
let g:vimwiki_rxWeblink = '\%("[^"(]\+\((\([^)]\+\))\)\?":\)\?'.
\'\%(https\?\|ftp\|gopher\|telnet\|file\|notes\|ms-help\):'.
\'\%(\%(\%(//\)\|\%(\\\\\)\)\+[A-Za-z0-9:#@%/;,$~()_?+=.&\\\-]*\)'
\'\%(\%(\%(//\)\|\%(\\\\\)\)\+[A-Za-z0-9:#@%/;,$~()_?+=.&\\\-]*\)'.
\'[().,?]\@<!'
"}}}
" AUTOCOMMANDS for all known wiki extensions {{{
@ -316,12 +299,13 @@ augroup vimwiki
for ext in keys(extensions)
exe 'autocmd BufEnter *'.ext.' call s:setup_buffer_enter()'
exe 'autocmd BufLeave,BufHidden *'.ext.' call s:setup_buffer_leave()'
exe 'autocmd BufNewFile,BufRead, *'.ext.' setf vimwiki'
" ColorScheme could have or could have not a
" VimwikiHeader1..VimwikiHeader6 highlight groups. We need to refresh
" syntax after colorscheme change.
exe 'autocmd ColorScheme *'.ext.' call s:setup_colors()'.
\ ' | set syntax=vimwiki'
exe 'autocmd ColorScheme *'.ext.' call vimwiki#setup_colors()'.
\ ' | call vimwiki#highlight_links()'
" Format tables when exit from insert mode. Do not use textwidth to
" autowrap tables.
@ -334,11 +318,11 @@ augroup END
"}}}
" COMMANDS {{{
command! VimwikiUISelect call vimwiki#WikiUISelect()
command! -count VimwikiGoHome
\ call vimwiki#WikiGoHome(v:count1)
command! -count VimwikiTabGoHome tabedit <bar>
\ call vimwiki#WikiGoHome(v:count1)
command! VimwikiUISelect call vimwiki#ui_select()
command! -count VimwikiIndex
\ call vimwiki#goto_index(v:count1)
command! -count VimwikiTabIndex tabedit <bar>
\ call vimwiki#goto_index(v:count1)
command! -count VimwikiMakeDiaryNote
\ call vimwiki_diary#make_note(v:count1)
@ -347,15 +331,15 @@ command! -count VimwikiTabMakeDiaryNote tabedit <bar>
"}}}
" MAPPINGS {{{
if !hasmapto('<Plug>VimwikiGoHome')
map <silent><unique> <Leader>ww <Plug>VimwikiGoHome
if !hasmapto('<Plug>VimwikiIndex')
map <silent><unique> <Leader>ww <Plug>VimwikiIndex
endif
noremap <unique><script> <Plug>VimwikiGoHome :VimwikiGoHome<CR>
noremap <unique><script> <Plug>VimwikiIndex :VimwikiIndex<CR>
if !hasmapto('<Plug>VimwikiTabGoHome')
map <silent><unique> <Leader>wt <Plug>VimwikiTabGoHome
if !hasmapto('<Plug>VimwikiTabIndex')
map <silent><unique> <Leader>wt <Plug>VimwikiTabIndex
endif
noremap <unique><script> <Plug>VimwikiTabGoHome :VimwikiTabGoHome<CR>
noremap <unique><script> <Plug>VimwikiTabIndex :VimwikiTabIndex<CR>
if !hasmapto('<Plug>VimwikiUISelect')
map <silent><unique> <Leader>ws <Plug>VimwikiUISelect
@ -382,7 +366,7 @@ function! s:build_menu(topmenu)
let norm_path = fnamemodify(VimwikiGet('path', idx), ':h:t')
let norm_path = escape(norm_path, '\ ')
execute 'menu '.a:topmenu.'.Open\ index.'.norm_path.
\ ' :call vimwiki#WikiGoHome('.(idx + 1).')<CR>'
\ ' :call vimwiki#goto_index('.(idx + 1).')<CR>'
execute 'menu '.a:topmenu.'.Open/Create\ diary\ note.'.norm_path.
\ ' :call vimwiki_diary#make_note('.(idx + 1).')<CR>'
let idx += 1