Version 1.0
* NEW: Issue 41: Table cell and column text objects. See `vimwiki-text-objects`. * NEW: Issue 42: Commands to move table columns left and right. See `:VimwikiTableMoveColumnLeft` and `:VimwikiTableMoveColumnRight`. * NEW: Issue 44: `<S-Tab>` should move cursor to the previous table cell. * NEW: Issue 45: It should be possible to indent tables. Indented tables are centered in html. * NEW: Issue 46: Do not htmlize some wiki pages (blacklist). New placeholder is added: `%nohtml`. See `vimwiki-nohtml`. * FIX: Issue 47: Lists aren't HTMLized properly. * FIX: Issue 48: With autochdir it is impossible to have path_html such as `d:\vimwiki\html\` * FIX: Issue 49: Table is not HTMLized properly at the end of wiki page. * FIX: Issue 50: Inline formatting is not performed in table cells. * FIX: Issue 51: Cannot insert '-' (minus) into table cells of the first column. * FIX: Issue 52: Table cell width is incorrect when double wide characters are used (ie. Chinese). Check `g:vimwiki_CJK_length`. * NEW: Issue 53: Wiki markup can not nested. (Use links and inline markup in Headers). * NEW: Issue 54: Highlight for placeholders. * NEW: Issue 56: Directory indexes. See `g:vimwiki_dir_link` option and `:VimwikiGenerateLinks` command. * NEW: Issue 58: Html new lines with `<br />`. Could be inserted with `<S-CR>` in insert mode. * FIX: Issue 59: List item's text can't be started from `*`. * NEW: Issue 60: Links inside completed gtd-items. * NEW: Issue 61: Headers numbering. See `g:vimwiki_html_header_numbering` and `g:vimwiki_html_header_numbering_sym` options. * FIX: Issue 63: Table cannot have leading empty cells in html. * FIX: Issue 65: Table separator is not htmlized right if on top of the table. * FIX: Issue 66: Table empty cells are very small in html. * FIX: Issue 67: Wrong html conversion of multilined list item with bold text on the start of next line. * FIX: Issue 68: auto-indent problem with langmap. * FIX: Issue 73: Link navigation by Tab. "Escaped" wiki-word should be skipped for navigation with `<tab>`. * FIX: Issue 75: `code` syntax doesn't display correctly in toc. * FIX: Issue 77: Diary index only showing link to today's diary entry file for extensions other than '.wiki'. * FIX: Issue 79: Further calendar.vim integration -- add sign to calendar date if it has corresponding diary page. * FIX: Issue 80: Debian Lenny GUI Vim 7.2 has problems with toggling inner todo list items. * FIX: Issue 81: Don't convert `WikiWord` as a link in html when `let g:vimwiki_camel_case = 0`
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
" vim:tabstop=2:shiftwidth=2:expandtab:foldmethod=marker:textwidth=79
|
||||
" Vimwiki plugin file
|
||||
" Author: Maxim Kim <habamax@gmail.com>
|
||||
" Home: http://code.google.com/p/vimwiki/
|
||||
@ -18,25 +19,22 @@ function! s:default(varname, value) "{{{
|
||||
endif
|
||||
endfunction "}}}
|
||||
|
||||
function! Str_common_part(str1, str2)"{{{
|
||||
" return longest common prefix of 2 given strings.
|
||||
" 'Hello world', 'Hello worm' => 'Hello wor'
|
||||
function! s:str_common_pfx(str1, str2) "{{{
|
||||
let idx = 0
|
||||
let minlen = min([len(a:str1), len(a:str2)])
|
||||
while (idx < minlen) && (a:str1[idx] == a:str2[idx])
|
||||
while (idx < minlen) && (a:str1[idx] ==? a:str2[idx])
|
||||
let idx = idx + 1
|
||||
endwhile
|
||||
|
||||
return strpart(a:str1, 0, idx)
|
||||
endfunction"}}}
|
||||
|
||||
function! s:chomp_slash(str)"{{{
|
||||
return substitute(a:str, '[/\\]\+$', '', '')
|
||||
endfunction"}}}
|
||||
endfunction "}}}
|
||||
|
||||
function! s:find_wiki(path) "{{{
|
||||
let idx = 0
|
||||
while idx < len(g:vimwiki_list)
|
||||
let path = s:chomp_slash(expand(VimwikiGet('path', idx)))
|
||||
if Str_common_part(path, a:path) == path
|
||||
let path = vimwiki#chomp_slash(expand(VimwikiGet('path', idx)))
|
||||
if s:str_common_pfx(path, a:path) == path
|
||||
return idx
|
||||
endif
|
||||
let idx += 1
|
||||
@ -214,7 +212,7 @@ let s:vimwiki_defaults.diary_rel_path = 'diary/'
|
||||
let s:vimwiki_defaults.diary_index = 'diary'
|
||||
let s:vimwiki_defaults.diary_header = 'Diary'
|
||||
|
||||
" Do not change this! Will wait till vim would be more datetime awareable.
|
||||
" Do not change this! Will wait till vim become more datetime awareable.
|
||||
let s:vimwiki_defaults.diary_link_fmt = '%Y-%m-%d'
|
||||
|
||||
let s:vimwiki_defaults.diary_link_count = 4
|
||||
@ -265,6 +263,11 @@ endif
|
||||
call s:default('use_calendar', 1)
|
||||
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('html_header_numbering', 0)
|
||||
call s:default('html_header_numbering_sym', '')
|
||||
|
||||
call s:default('current_idx', 0)
|
||||
|
||||
@ -275,14 +278,17 @@ let nup = low.oth
|
||||
let nlo = upp.oth
|
||||
let any = upp.nup
|
||||
|
||||
let g:vimwiki_word1 = '\C\<['.upp.']['.nlo.']*['.
|
||||
\ low.']['.nup.']*['.upp.']['.any.']*\>'
|
||||
let g:vimwiki_word2 = '\[\[[^\]]\+\]\]'
|
||||
let g:vimwiki_word3 = '\[\[[^\]]\+\]\[[^\]]\+\]\]'
|
||||
let wword = '\C\<['.upp.']['.nlo.']*['.low.']['.nup.']*['.upp.']['.any.']*\>'
|
||||
let g:vimwiki_rxWikiWord = '!\@<!'.wword
|
||||
let g:vimwiki_rxNoWikiWord = '!'.wword
|
||||
|
||||
let g:vimwiki_rxWikiLink1 = '\[\[[^\]]\+\]\]'
|
||||
let g:vimwiki_rxWikiLink2 = '\[\[[^\]]\+\]\[[^\]]\+\]\]'
|
||||
if g:vimwiki_camel_case
|
||||
let g:vimwiki_rxWikiWord = g:vimwiki_word1.'\|'.g:vimwiki_word2.'\|'.g:vimwiki_word3
|
||||
let g:vimwiki_rxWikiLink = g:vimwiki_rxWikiWord.'\|'.
|
||||
\ g:vimwiki_rxWikiLink1.'\|'.g:vimwiki_rxWikiLink2
|
||||
else
|
||||
let g:vimwiki_rxWikiWord = g:vimwiki_word2.'\|'.g:vimwiki_word3
|
||||
let g:vimwiki_rxWikiLink = g:vimwiki_rxWikiLink1.'\|'.g:vimwiki_rxWikiLink2
|
||||
endif
|
||||
let g:vimwiki_rxWeblink = '\%("[^"(]\+\((\([^)]\+\))\)\?":\)\?'.
|
||||
\'\%(https\?\|ftp\|gopher\|telnet\|file\|notes\|ms-help\):'.
|
||||
@ -387,6 +393,8 @@ function! s:build_table_menu(topmenu)
|
||||
exe 'menu '.a:topmenu.'.-Sep- :'
|
||||
exe 'menu '.a:topmenu.'.Table.Create\ (enter\ cols\ rows) :VimwikiTable '
|
||||
exe 'nmenu '.a:topmenu.'.Table.Format<tab>gqq gqq'
|
||||
exe 'nmenu '.a:topmenu.'.Table.Move\ column\ left<tab><A-Left> :VimwikiTableMoveColumnLeft<CR>'
|
||||
exe 'nmenu '.a:topmenu.'.Table.Move\ column\ right<tab><A-Right> :VimwikiTableMoveColumnRight<CR>'
|
||||
exe 'nmenu disable '.a:topmenu.'.Table'
|
||||
endfunction
|
||||
|
||||
@ -399,6 +407,7 @@ endif
|
||||
" CALENDAR Hook "{{{
|
||||
if g:vimwiki_use_calendar
|
||||
let g:calendar_action = 'vimwiki_diary#calendar_action'
|
||||
let g:calendar_sign = 'vimwiki_diary#calendar_sign'
|
||||
endif
|
||||
"}}}
|
||||
|
||||
|
Reference in New Issue
Block a user