vimwiki/autoload/vimwiki/diary.vim

296 lines
7.4 KiB
VimL
Raw Normal View History

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`
2010-05-12 02:00:00 +02:00
" vim:tabstop=2:shiftwidth=2:expandtab:foldmethod=marker:textwidth=79
" Vimwiki autoload plugin file
" Desc: Handle diary notes
" Home: https://github.com/vimwiki/vimwiki/
" Load only once {{{
if exists("g:loaded_vimwiki_diary_auto") || &cp
finish
endif
let g:loaded_vimwiki_diary_auto = 1
"}}}
let s:vimwiki_max_scan_for_caption = 5
" Helpers {{{
function! s:prefix_zero(num) "{{{
if a:num < 10
return '0'.a:num
endif
return a:num
endfunction "}}}
function! s:get_date_link(fmt) "{{{
return strftime(a:fmt)
endfunction "}}}
function! s:diary_path(...) "{{{
let idx = a:0 == 0 ? g:vimwiki_current_idx : a:1
return VimwikiGet('path', idx).VimwikiGet('diary_rel_path', idx)
endfunction "}}}
function! s:diary_index(...) "{{{
let idx = a:0 == 0 ? g:vimwiki_current_idx : a:1
return s:diary_path(idx).VimwikiGet('diary_index', idx).VimwikiGet('ext', idx)
endfunction "}}}
function! s:diary_date_link(...) "{{{
let idx = a:0 == 0 ? g:vimwiki_current_idx : a:1
return s:get_date_link(VimwikiGet('diary_link_fmt', idx))
endfunction "}}}
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.
2010-08-24 02:00:00 +02:00
function! s:get_position_links(link) "{{{
let idx = -1
let links = []
if a:link =~# '^\d\{4}-\d\d-\d\d'
let links = keys(s:get_diary_links())
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.
2010-08-24 02:00:00 +02:00
" include 'today' into links
if index(links, s:diary_date_link()) == -1
call add(links, s:diary_date_link())
endif
call sort(links)
let idx = index(links, a:link)
endif
return [idx, links]
endfunction "}}}
fun! s:get_month_name(month) "{{{
return g:vimwiki_diary_months[str2nr(a:month)]
endfun "}}}
" Helpers }}}
" Diary index stuff {{{
fun! s:read_captions(files) "{{{
let result = {}
for fl in a:files
" remove paths and extensions
let fl_key = fnamemodify(fl, ':t:r')
if filereadable(fl)
for line in readfile(fl, '', s:vimwiki_max_scan_for_caption)
if line =~# g:vimwiki_rxHeader && !has_key(result, fl_key)
let result[fl_key] = vimwiki#u#trim(matchstr(line, g:vimwiki_rxHeader))
endif
endfor
endif
if !has_key(result, fl_key)
let result[fl_key] = ''
endif
endfor
return result
endfun "}}}
2015-12-07 12:25:17 +01:00
fun! s:get_diary_links() "{{{
let rx = '^\d\{4}-\d\d-\d\d'
let s_files = glob(VimwikiGet('path').VimwikiGet('diary_rel_path').'*'.VimwikiGet('ext'))
let files = split(s_files, '\n')
call filter(files, 'fnamemodify(v:val, ":t") =~# "'.escape(rx, '\').'"')
" remove backup files (.wiki~)
call filter(files, 'v:val !~# ''.*\~$''')
let links_with_captions = s:read_captions(files)
return links_with_captions
endfun "}}}
fun! s:group_links(links) "{{{
let result = {}
let p_year = 0
let p_month = 0
for fl in sort(keys(a:links))
let year = strpart(fl, 0, 4)
let month = strpart(fl, 5, 2)
if p_year != year
let result[year] = {}
let p_month = 0
endif
if p_month != month
let result[year][month] = {}
endif
let result[year][month][fl] = a:links[fl]
let p_year = year
let p_month = month
endfor
return result
endfun "}}}
function! s:sort(lst) "{{{
if VimwikiGet("diary_sort") ==? 'desc'
return reverse(sort(a:lst))
else
return sort(a:lst)
endif
endfunction "}}}
2015-12-07 12:25:17 +01:00
function! s:format_diary() "{{{
let result = []
2015-12-07 12:25:17 +01:00
let g_files = s:group_links(s:get_diary_links())
for year in s:sort(keys(g_files))
call add(result, '')
call add(result, substitute(g:vimwiki_rxH2_Template, '__Header__', year , ''))
for month in s:sort(keys(g_files[year]))
call add(result, '')
call add(result, substitute(g:vimwiki_rxH3_Template, '__Header__', s:get_month_name(month), ''))
for [fl, cap] in s:sort(items(g_files[year][month]))
if empty(cap)
let entry = substitute(g:vimwiki_WikiLinkTemplate1, '__LinkUrl__', fl, '')
let entry = substitute(entry, '__LinkDescription__', cap, '')
call add(result, repeat(' ', &sw).'* '.entry)
else
let entry = substitute(g:vimwiki_WikiLinkTemplate2, '__LinkUrl__', fl, '')
let entry = substitute(entry, '__LinkDescription__', cap, '')
call add(result, repeat(' ', &sw).'* '.entry)
endif
endfor
endfor
endfor
return result
endfunction "}}}
" Diary index stuff }}}
function! vimwiki#diary#make_note(wnum, ...) "{{{
if a:wnum > len(g:vimwiki_list)
echom "vimwiki: Wiki ".a:wnum." is not registered in g:vimwiki_list!"
return
endif
" TODO: refactor it. base#goto_index uses the same
if a:wnum > 0
let idx = a:wnum - 1
else
let idx = 0
endif
call vimwiki#path#mkdir(VimwikiGet('path', idx).VimwikiGet('diary_rel_path', idx))
if a:0 && a:1 == 1
let cmd = 'tabedit'
else
let cmd = 'edit'
endif
if a:0>1
let link = 'diary:'.a:2
else
let link = 'diary:'.s:diary_date_link(idx)
endif
Version 1.2 = Note = Remove previous version of vimwiki before install - files in autoload dir is moved/renamed to autoload/vimwiki dir. = Changelog = * Issue 70: Table spanning cell support. * Issue 72: Do not convert again for unchanged file. |:VimwikiAll2HTML| converts only changed wiki files. * Issue 117: |VimwikiDiaryIndex| command that opens diary index wiki page. * Issue 120: Links in headers are not highlighted in vimwiki but are highlighted in HTML. * Issue 138: Added possibility to remap table-column move bindings. See |:VimwikiTableMoveColumnLeft| and |:VimwikiTableMoveColumnRight| commands. For remap instructions see |vimwiki_<A-Left>| and |vimwiki_<A-Right>|. * Issue 125: Problem with 'o' command given while at the of the file. * Issue 131: FileType is not set up when GUIEnter autocommand is used in vimrc. Use 'nested' in 'au GUIEnter * nested VimwikiIndex' * Issue 132: Link to perl (or any non-wiki) file in vimwiki subdirectory doesn't work as intended. * Issue 135: %title and %toc used together cause TOC to appear in an unexpected place in HTML. * Issue 139: |:VimwikiTabnewLink| command is added. * Fix of g:vimwiki_stripsym = '' (i.e. an empty string) -- it removes bad symbols from filenames. * Issue 145: With modeline 'set ft=vimwiki' links are not correctly highlighted when open wiki files. * Issue 146: Filetype difficulty with ".txt" as a vimwiki extension. * Issue 148: There are no mailto links. * Issue 151: Use location list instead of quickfix list for :VimwikiSearch command result. Use :lopen instead of :copen, :lnext instead of :cnext etc. * Issue 152: Add the list of HTML files that would not be deleted after |:VimwikiAll2HTML|. * Issue 153: Delete HTML files that has no corresponding wiki ones with |:VimwikiAll2HTML|. * Issue 156: Add multiple HTML templates. See |vimwiki-option-template_path|. Options html_header and html_footer are no longer exist. * Issue 173: When virtualedit=all option is enabled the 'o' command behave strange. * Issue 178: Problem with alike wikie's paths. * Issue 182: Browser command does not quote url. * Issue 183: Spelling error highlighting is not possible with nested syntaxes. * Issue 184: Wrong foldlevel in some cases. * Issue 195: Page renaming issue. * Issue 196: vim: modeline bug -- syn=vim doesn't work. * Issue 199: Generated HTML for sublists is invalid. * Issue 200: Generated HTML for todo lists does not show completion status the fix relies on CSS, thus your old stylesheets need to be updated!; may not work in obsolete browsers or font-deficient systems. * Issue 205: Block code: highlighting differs from processing. Inline code block {{{ ... }}} is removed. Use `...` instead. * Issue 208: Default highlight colors are problematic in many colorschemes. Headers are highlighted as |hl-Title| by default, use |g:vimwiki_hl_headers| to restore previous default Red, Green, Blue or custom header colors. Some other changes in highlighting. * Issue 209: Wild comments slow down html generation. Comments are changed, use %% to comment out entire line. * Issue 210: HTML: para enclose header. * Issue 214: External links containing Chinese characters get trimmed. * Issue 218: Command to generate HTML file and open it in webbrowser. See |:Vimwiki2HTMLBrowse|(bind to <leader>whh) * NEW: Added <Leader>wh mapping to call |:Vimwiki2HTML|
2011-06-11 02:00:00 +02:00
call vimwiki#base#open_link(cmd, link, s:diary_index(idx))
call vimwiki#base#setup_buffer_state(idx)
endfunction "}}}
function! vimwiki#diary#goto_diary_index(wnum) "{{{
if a:wnum > len(g:vimwiki_list)
echom "vimwiki: Wiki ".a:wnum." is not registered in g:vimwiki_list!"
return
endif
" TODO: refactor it. base#goto_index uses the same
if a:wnum > 0
let idx = a:wnum - 1
else
let idx = 0
endif
call vimwiki#base#edit_file('e', s:diary_index(idx), '')
call vimwiki#base#setup_buffer_state(idx)
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`
2010-05-12 02:00:00 +02:00
endfunction "}}}
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.
2010-08-24 02:00:00 +02:00
Version 1.2 = Note = Remove previous version of vimwiki before install - files in autoload dir is moved/renamed to autoload/vimwiki dir. = Changelog = * Issue 70: Table spanning cell support. * Issue 72: Do not convert again for unchanged file. |:VimwikiAll2HTML| converts only changed wiki files. * Issue 117: |VimwikiDiaryIndex| command that opens diary index wiki page. * Issue 120: Links in headers are not highlighted in vimwiki but are highlighted in HTML. * Issue 138: Added possibility to remap table-column move bindings. See |:VimwikiTableMoveColumnLeft| and |:VimwikiTableMoveColumnRight| commands. For remap instructions see |vimwiki_<A-Left>| and |vimwiki_<A-Right>|. * Issue 125: Problem with 'o' command given while at the of the file. * Issue 131: FileType is not set up when GUIEnter autocommand is used in vimrc. Use 'nested' in 'au GUIEnter * nested VimwikiIndex' * Issue 132: Link to perl (or any non-wiki) file in vimwiki subdirectory doesn't work as intended. * Issue 135: %title and %toc used together cause TOC to appear in an unexpected place in HTML. * Issue 139: |:VimwikiTabnewLink| command is added. * Fix of g:vimwiki_stripsym = '' (i.e. an empty string) -- it removes bad symbols from filenames. * Issue 145: With modeline 'set ft=vimwiki' links are not correctly highlighted when open wiki files. * Issue 146: Filetype difficulty with ".txt" as a vimwiki extension. * Issue 148: There are no mailto links. * Issue 151: Use location list instead of quickfix list for :VimwikiSearch command result. Use :lopen instead of :copen, :lnext instead of :cnext etc. * Issue 152: Add the list of HTML files that would not be deleted after |:VimwikiAll2HTML|. * Issue 153: Delete HTML files that has no corresponding wiki ones with |:VimwikiAll2HTML|. * Issue 156: Add multiple HTML templates. See |vimwiki-option-template_path|. Options html_header and html_footer are no longer exist. * Issue 173: When virtualedit=all option is enabled the 'o' command behave strange. * Issue 178: Problem with alike wikie's paths. * Issue 182: Browser command does not quote url. * Issue 183: Spelling error highlighting is not possible with nested syntaxes. * Issue 184: Wrong foldlevel in some cases. * Issue 195: Page renaming issue. * Issue 196: vim: modeline bug -- syn=vim doesn't work. * Issue 199: Generated HTML for sublists is invalid. * Issue 200: Generated HTML for todo lists does not show completion status the fix relies on CSS, thus your old stylesheets need to be updated!; may not work in obsolete browsers or font-deficient systems. * Issue 205: Block code: highlighting differs from processing. Inline code block {{{ ... }}} is removed. Use `...` instead. * Issue 208: Default highlight colors are problematic in many colorschemes. Headers are highlighted as |hl-Title| by default, use |g:vimwiki_hl_headers| to restore previous default Red, Green, Blue or custom header colors. Some other changes in highlighting. * Issue 209: Wild comments slow down html generation. Comments are changed, use %% to comment out entire line. * Issue 210: HTML: para enclose header. * Issue 214: External links containing Chinese characters get trimmed. * Issue 218: Command to generate HTML file and open it in webbrowser. See |:Vimwiki2HTMLBrowse|(bind to <leader>whh) * NEW: Added <Leader>wh mapping to call |:Vimwiki2HTML|
2011-06-11 02:00:00 +02:00
function! vimwiki#diary#goto_next_day() "{{{
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.
2010-08-24 02:00:00 +02:00
let link = ''
let [idx, links] = s:get_position_links(expand('%:t:r'))
if idx == (len(links) - 1)
return
endif
if idx != -1 && idx < len(links) - 1
let link = 'diary:'.links[idx+1]
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.
2010-08-24 02:00:00 +02:00
else
" goto today
let link = 'diary:'.s:diary_date_link()
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.
2010-08-24 02:00:00 +02:00
endif
if len(link)
Version 1.2 = Note = Remove previous version of vimwiki before install - files in autoload dir is moved/renamed to autoload/vimwiki dir. = Changelog = * Issue 70: Table spanning cell support. * Issue 72: Do not convert again for unchanged file. |:VimwikiAll2HTML| converts only changed wiki files. * Issue 117: |VimwikiDiaryIndex| command that opens diary index wiki page. * Issue 120: Links in headers are not highlighted in vimwiki but are highlighted in HTML. * Issue 138: Added possibility to remap table-column move bindings. See |:VimwikiTableMoveColumnLeft| and |:VimwikiTableMoveColumnRight| commands. For remap instructions see |vimwiki_<A-Left>| and |vimwiki_<A-Right>|. * Issue 125: Problem with 'o' command given while at the of the file. * Issue 131: FileType is not set up when GUIEnter autocommand is used in vimrc. Use 'nested' in 'au GUIEnter * nested VimwikiIndex' * Issue 132: Link to perl (or any non-wiki) file in vimwiki subdirectory doesn't work as intended. * Issue 135: %title and %toc used together cause TOC to appear in an unexpected place in HTML. * Issue 139: |:VimwikiTabnewLink| command is added. * Fix of g:vimwiki_stripsym = '' (i.e. an empty string) -- it removes bad symbols from filenames. * Issue 145: With modeline 'set ft=vimwiki' links are not correctly highlighted when open wiki files. * Issue 146: Filetype difficulty with ".txt" as a vimwiki extension. * Issue 148: There are no mailto links. * Issue 151: Use location list instead of quickfix list for :VimwikiSearch command result. Use :lopen instead of :copen, :lnext instead of :cnext etc. * Issue 152: Add the list of HTML files that would not be deleted after |:VimwikiAll2HTML|. * Issue 153: Delete HTML files that has no corresponding wiki ones with |:VimwikiAll2HTML|. * Issue 156: Add multiple HTML templates. See |vimwiki-option-template_path|. Options html_header and html_footer are no longer exist. * Issue 173: When virtualedit=all option is enabled the 'o' command behave strange. * Issue 178: Problem with alike wikie's paths. * Issue 182: Browser command does not quote url. * Issue 183: Spelling error highlighting is not possible with nested syntaxes. * Issue 184: Wrong foldlevel in some cases. * Issue 195: Page renaming issue. * Issue 196: vim: modeline bug -- syn=vim doesn't work. * Issue 199: Generated HTML for sublists is invalid. * Issue 200: Generated HTML for todo lists does not show completion status the fix relies on CSS, thus your old stylesheets need to be updated!; may not work in obsolete browsers or font-deficient systems. * Issue 205: Block code: highlighting differs from processing. Inline code block {{{ ... }}} is removed. Use `...` instead. * Issue 208: Default highlight colors are problematic in many colorschemes. Headers are highlighted as |hl-Title| by default, use |g:vimwiki_hl_headers| to restore previous default Red, Green, Blue or custom header colors. Some other changes in highlighting. * Issue 209: Wild comments slow down html generation. Comments are changed, use %% to comment out entire line. * Issue 210: HTML: para enclose header. * Issue 214: External links containing Chinese characters get trimmed. * Issue 218: Command to generate HTML file and open it in webbrowser. See |:Vimwiki2HTMLBrowse|(bind to <leader>whh) * NEW: Added <Leader>wh mapping to call |:Vimwiki2HTML|
2011-06-11 02:00:00 +02:00
call vimwiki#base#open_link(':e ', link)
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.
2010-08-24 02:00:00 +02:00
endif
endfunction "}}}
Version 1.2 = Note = Remove previous version of vimwiki before install - files in autoload dir is moved/renamed to autoload/vimwiki dir. = Changelog = * Issue 70: Table spanning cell support. * Issue 72: Do not convert again for unchanged file. |:VimwikiAll2HTML| converts only changed wiki files. * Issue 117: |VimwikiDiaryIndex| command that opens diary index wiki page. * Issue 120: Links in headers are not highlighted in vimwiki but are highlighted in HTML. * Issue 138: Added possibility to remap table-column move bindings. See |:VimwikiTableMoveColumnLeft| and |:VimwikiTableMoveColumnRight| commands. For remap instructions see |vimwiki_<A-Left>| and |vimwiki_<A-Right>|. * Issue 125: Problem with 'o' command given while at the of the file. * Issue 131: FileType is not set up when GUIEnter autocommand is used in vimrc. Use 'nested' in 'au GUIEnter * nested VimwikiIndex' * Issue 132: Link to perl (or any non-wiki) file in vimwiki subdirectory doesn't work as intended. * Issue 135: %title and %toc used together cause TOC to appear in an unexpected place in HTML. * Issue 139: |:VimwikiTabnewLink| command is added. * Fix of g:vimwiki_stripsym = '' (i.e. an empty string) -- it removes bad symbols from filenames. * Issue 145: With modeline 'set ft=vimwiki' links are not correctly highlighted when open wiki files. * Issue 146: Filetype difficulty with ".txt" as a vimwiki extension. * Issue 148: There are no mailto links. * Issue 151: Use location list instead of quickfix list for :VimwikiSearch command result. Use :lopen instead of :copen, :lnext instead of :cnext etc. * Issue 152: Add the list of HTML files that would not be deleted after |:VimwikiAll2HTML|. * Issue 153: Delete HTML files that has no corresponding wiki ones with |:VimwikiAll2HTML|. * Issue 156: Add multiple HTML templates. See |vimwiki-option-template_path|. Options html_header and html_footer are no longer exist. * Issue 173: When virtualedit=all option is enabled the 'o' command behave strange. * Issue 178: Problem with alike wikie's paths. * Issue 182: Browser command does not quote url. * Issue 183: Spelling error highlighting is not possible with nested syntaxes. * Issue 184: Wrong foldlevel in some cases. * Issue 195: Page renaming issue. * Issue 196: vim: modeline bug -- syn=vim doesn't work. * Issue 199: Generated HTML for sublists is invalid. * Issue 200: Generated HTML for todo lists does not show completion status the fix relies on CSS, thus your old stylesheets need to be updated!; may not work in obsolete browsers or font-deficient systems. * Issue 205: Block code: highlighting differs from processing. Inline code block {{{ ... }}} is removed. Use `...` instead. * Issue 208: Default highlight colors are problematic in many colorschemes. Headers are highlighted as |hl-Title| by default, use |g:vimwiki_hl_headers| to restore previous default Red, Green, Blue or custom header colors. Some other changes in highlighting. * Issue 209: Wild comments slow down html generation. Comments are changed, use %% to comment out entire line. * Issue 210: HTML: para enclose header. * Issue 214: External links containing Chinese characters get trimmed. * Issue 218: Command to generate HTML file and open it in webbrowser. See |:Vimwiki2HTMLBrowse|(bind to <leader>whh) * NEW: Added <Leader>wh mapping to call |:Vimwiki2HTML|
2011-06-11 02:00:00 +02:00
function! vimwiki#diary#goto_prev_day() "{{{
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.
2010-08-24 02:00:00 +02:00
let link = ''
let [idx, links] = s:get_position_links(expand('%:t:r'))
if idx == 0
return
endif
if idx > 0
let link = 'diary:'.links[idx-1]
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.
2010-08-24 02:00:00 +02:00
else
" goto today
let link = 'diary:'.s:diary_date_link()
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.
2010-08-24 02:00:00 +02:00
endif
if len(link)
Version 1.2 = Note = Remove previous version of vimwiki before install - files in autoload dir is moved/renamed to autoload/vimwiki dir. = Changelog = * Issue 70: Table spanning cell support. * Issue 72: Do not convert again for unchanged file. |:VimwikiAll2HTML| converts only changed wiki files. * Issue 117: |VimwikiDiaryIndex| command that opens diary index wiki page. * Issue 120: Links in headers are not highlighted in vimwiki but are highlighted in HTML. * Issue 138: Added possibility to remap table-column move bindings. See |:VimwikiTableMoveColumnLeft| and |:VimwikiTableMoveColumnRight| commands. For remap instructions see |vimwiki_<A-Left>| and |vimwiki_<A-Right>|. * Issue 125: Problem with 'o' command given while at the of the file. * Issue 131: FileType is not set up when GUIEnter autocommand is used in vimrc. Use 'nested' in 'au GUIEnter * nested VimwikiIndex' * Issue 132: Link to perl (or any non-wiki) file in vimwiki subdirectory doesn't work as intended. * Issue 135: %title and %toc used together cause TOC to appear in an unexpected place in HTML. * Issue 139: |:VimwikiTabnewLink| command is added. * Fix of g:vimwiki_stripsym = '' (i.e. an empty string) -- it removes bad symbols from filenames. * Issue 145: With modeline 'set ft=vimwiki' links are not correctly highlighted when open wiki files. * Issue 146: Filetype difficulty with ".txt" as a vimwiki extension. * Issue 148: There are no mailto links. * Issue 151: Use location list instead of quickfix list for :VimwikiSearch command result. Use :lopen instead of :copen, :lnext instead of :cnext etc. * Issue 152: Add the list of HTML files that would not be deleted after |:VimwikiAll2HTML|. * Issue 153: Delete HTML files that has no corresponding wiki ones with |:VimwikiAll2HTML|. * Issue 156: Add multiple HTML templates. See |vimwiki-option-template_path|. Options html_header and html_footer are no longer exist. * Issue 173: When virtualedit=all option is enabled the 'o' command behave strange. * Issue 178: Problem with alike wikie's paths. * Issue 182: Browser command does not quote url. * Issue 183: Spelling error highlighting is not possible with nested syntaxes. * Issue 184: Wrong foldlevel in some cases. * Issue 195: Page renaming issue. * Issue 196: vim: modeline bug -- syn=vim doesn't work. * Issue 199: Generated HTML for sublists is invalid. * Issue 200: Generated HTML for todo lists does not show completion status the fix relies on CSS, thus your old stylesheets need to be updated!; may not work in obsolete browsers or font-deficient systems. * Issue 205: Block code: highlighting differs from processing. Inline code block {{{ ... }}} is removed. Use `...` instead. * Issue 208: Default highlight colors are problematic in many colorschemes. Headers are highlighted as |hl-Title| by default, use |g:vimwiki_hl_headers| to restore previous default Red, Green, Blue or custom header colors. Some other changes in highlighting. * Issue 209: Wild comments slow down html generation. Comments are changed, use %% to comment out entire line. * Issue 210: HTML: para enclose header. * Issue 214: External links containing Chinese characters get trimmed. * Issue 218: Command to generate HTML file and open it in webbrowser. See |:Vimwiki2HTMLBrowse|(bind to <leader>whh) * NEW: Added <Leader>wh mapping to call |:Vimwiki2HTML|
2011-06-11 02:00:00 +02:00
call vimwiki#base#open_link(':e ', link)
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.
2010-08-24 02:00:00 +02:00
endif
endfunction "}}}
function! vimwiki#diary#generate_diary_section() "{{{
let current_file = vimwiki#path#path_norm(expand("%:p"))
let diary_file = vimwiki#path#path_norm(s:diary_index())
if vimwiki#path#is_equal(current_file, diary_file)
let content_rx = '^\%(\s*\* \)\|\%(^\s*$\)\|\%('.g:vimwiki_rxHeader.'\)'
call vimwiki#base#update_listing_in_buffer(s:format_diary(),
\ VimwikiGet('diary_header'), content_rx, line('$')+1, 1)
else
echom "vimwiki: You can generate diary links only in a diary index page!"
endif
endfunction "}}}
" Calendar.vim {{{
" Callback function.
function! vimwiki#diary#calendar_action(day, month, year, week, dir) "{{{
let day = s:prefix_zero(a:day)
let month = s:prefix_zero(a:month)
let link = a:year.'-'.month.'-'.day
if winnr('#') == 0
if a:dir ==? 'V'
vsplit
else
split
endif
else
wincmd p
if !&hidden && &modified
new
endif
endif
" XXX: Well, +1 is for inconsistent index basing...
call vimwiki#diary#make_note(g:vimwiki_current_idx+1, 0, link)
endfunction "}}}
" Sign function.
function vimwiki#diary#calendar_sign(day, month, year) "{{{
let day = s:prefix_zero(a:day)
let month = s:prefix_zero(a:month)
let sfile = VimwikiGet('path').VimwikiGet('diary_rel_path').
\ a:year.'-'.month.'-'.day.VimwikiGet('ext')
return filereadable(expand(sfile))
endfunction "}}}
" Calendar.vim }}}