Version 0.6

* NEW: Header and footer templates. See g:vimwiki_html_header and g:vimwiki_html_footer in help.
 * FIX: :Vimwiki2HTML does not recognize ~ as part of a valid path.
This commit is contained in:
Maxim Kim 2009-02-04 00:00:00 +00:00 committed by Able Scraper
parent 1833ec1ad9
commit 344daede11

View File

@ -2,15 +2,14 @@
UseVimball
finish
autoload/vimwiki.vim [[[1
932
959
" VimWiki plugin file
" Language: Wiki
" Author: Maxim Kim (habamax at gmail dot com)
" Home: http://code.google.com/p/vimwiki/
" Filenames: *.wiki
" Last Change: 19.01.2009 23:43
" Version: 0.5.3
" Last Change: 04.02.2009 12:30
" Version: 0.6
if exists("g:loaded_vimwiki_auto") || &cp
finish
endif
@ -401,7 +400,7 @@ function! vimwiki#WikiAll2HTML(path) "{{{
call vimwiki#Wiki2HTML(a:path, wikifile)
endfor
call s:WikiCreateDefaultCSS(g:vimwiki_home_html)
echomsg 'Wikifiles converted.'
echomsg 'Done!'
let &more = setting_more
endfunction "}}}
@ -433,6 +432,20 @@ function! vimwiki#Wiki2HTML(path, wikifile) "{{{
function! s:HTMLHeader(title, charset) "{{{
let lines=[]
" globals are bad, but...
if g:vimwiki_html_header != ""
try
let lines = readfile(g:vimwiki_html_header)
call map(lines, 'substitute(v:val, "%title%", "'. a:title .'", "g")')
return lines
catch /E484/
call s:msg("Header template ". g:vimwiki_html_header. " does not exist!")
endtry
endif
" if no g:vimwiki_html_header set up or error while reading template
" file -- use default header.
call add(lines, "")
call add(lines, '<html>')
call add(lines, '<head>')
@ -441,14 +454,29 @@ function! vimwiki#Wiki2HTML(path, wikifile) "{{{
call add(lines, '<meta http-equiv="Content-Type" content="text/html; charset='.a:charset.'" />')
call add(lines, '</head>')
call add(lines, '<body>')
return lines
endfunction "}}}
function! s:HTMLFooter() "{{{
let lines=[]
" globals are bad, but...
if g:vimwiki_html_footer != ""
try
let lines = readfile(g:vimwiki_html_footer)
return lines
catch /E484/
call s:msg("Footer template ". g:vimwiki_html_footer. " does not exist!")
endtry
endif
" if no g:vimwiki_html_footer set up or error while reading template
" file -- use default footer.
call add(lines, "")
call add(lines, '</body>')
call add(lines, '</html>')
return lines
endfunction "}}}
@ -483,7 +511,6 @@ function! vimwiki#Wiki2HTML(path, wikifile) "{{{
endwhile
endfunction! "}}}
" TODO: сделать так, чтобы {{{WikiWord}}} нормально отрабатывал
function! s:processCode(line, code) "{{{
let lines = []
let code = a:code
@ -936,7 +963,7 @@ endfunction "}}}
" 2}}}
doc/vimwiki.txt [[[1
607
645
*vimwiki.txt* A Personal Wiki for Vim
__ __ ______ __ __ ______ __ __ ______ ~
@ -950,7 +977,7 @@ doc/vimwiki.txt [[[1
Let the help begins ...~
Version: 0.5.3 ~
Version: 0.6 ~
==============================================================================
CONTENTS *vimwiki-contents*
@ -1305,6 +1332,38 @@ Values: path
Set up directory for wiki files converted to HTML: >
let g:vimwiki_home_html = '~/my wiki/html/'
------------------------------------------------------------------------------
Default: "" *g:vimwiki_html_header*
Values: path to a header template
Set up file name for html header template: >
let g:vimwiki_html_header = '~/my wiki/html/header.html'
This header.html could look like: >
<html>
<head>
<link rel="Stylesheet" type="text/css" href="style.css" />
<title>%title%</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<div class="contents">
where %title% is replaced by a wiki page name.
------------------------------------------------------------------------------
Default: "" *g:vimwiki_html_footer*
Values: path to a footer template
Set up file name for html header template: >
let g:vimwiki_html_footer = '~/my wiki/html/footer.html'
This footer.html could look like: >
</div>
</body>
</html>
------------------------------------------------------------------------------
Default: "index" *g:vimwiki_index*
Values: filename without extension
@ -1438,6 +1497,11 @@ Vim plugins website: http://www.Vim.org/scripts/script.php?script_id=2226
==============================================================================
9. Changelog *vimwiki-changelog*
0.6
* [new] Header and footer templates. See|g:vimwiki_html_header| and
|g:vimwiki_html_footer|.
* [fix] |:Vimwiki2HTML| does not recognize ~ as part of a valid path.
0.5.3
* [fix] Fixed |:VimwikiRenameWord|. Error when g:vimwiki_home had
whitespaces in path.
@ -1449,10 +1513,10 @@ Vim plugins website: http://www.Vim.org/scripts/script.php?script_id=2226
* [new] Added <Leader>wt mapping to open vimwiki index file in a new tab.
* [new] Added g:vimwiki_gohome option that controls how|:VimwikiGoHome|
works when current buffer is changed. (Thanks Timur Zaripov)
* [fix] Fixed |:VimwikiRenameWord|. Very bad behaviour when autochdir isn't
set up.
* [fix] Fixed commands :Wiki2HTML and :WikiAll2HTML to be available only for
vimwiki buffers.
* [fix] Fixed |:VimwikiRenameWord|. Very bad behaviour when autochdir
isn't set up.
* [fix] Fixed commands :Wiki2HTML and :WikiAll2HTML to be available only
for vimwiki buffers.
* [fix] Renamed :Wiki2HTML and :WikiAll2HTML to |:Vimwiki2HTML| and
|:VimwikiAll2HTML| commands.
* [fix] Help file corrections.
@ -1462,8 +1526,8 @@ Vim plugins website: http://www.Vim.org/scripts/script.php?script_id=2226
* [new] Now you can fold headers.
* [new] <Plug>VimwikiGoHome and <Plug>VimwikiExploreHome were added.
* [fix] Bug with {{{HelloWikiWord}}} export to HTML is fixed.
* [del] Sync option removed from: Syntax highlighting for preformatted text
{{{ }}}.
* [del] Sync option removed from: Syntax highlighting for preformatted
text {{{ }}}.
0.5
* [new] vimwiki default markup to HTML conversion improved.
@ -1501,15 +1565,16 @@ Vim plugins website: http://www.Vim.org/scripts/script.php?script_id=2226
* [new] Highlight non-existent WikiWords.
* [new] Delete current WikiWord (<Leader>wd).
* [new] g:vimwiki_smartCR=2 => use Vim comments (see :h comments :h
formatoptions) feature to deal with list items. (thx -- Dmitry Alexandrov)
formatoptions) feature to deal with list items. (thx -- Dmitry
Alexandrov)
* [new] Highlight TODO:, DONE:, FIXED:, FIXME:.
* [new] Rename current WikiWord -- be careful on Windows you cannot rename
wikiword to WikiWord. After renaming update all links to that renamed
WikiWord.
* [fix] Bug -- do not duplicate WikiWords in wiki history.
* [fix] after renaming [[wiki word]] twice buffers are not deleted.
* [fix] when renaming from [[wiki word]] to WikiWord result is [[WikiWord]]
* [fix] more than one complex words on one line is bugging each other when
* [fix] After renaming [[wiki word]] twice buffers are not deleted.
* [fix] Renaming from [[wiki word]] to WikiWord result is [[WikiWord]]
* [fix] More than one complex words on one line is bugging each other when
try go to one of them. [[bla bla bla]] [[dodo dodo dodo]] becomes
bla bla bla]] [[dodo dodo dodo.
@ -1525,10 +1590,10 @@ Vim plugins website: http://www.Vim.org/scripts/script.php?script_id=2226
* [new] Added part of Google's Wiki syntax.
* [new] Added auto insert # with ENTER.
* [new] On/Off auto insert bullet with ENTER.
* [new] Strip [[complex wiki name]] from symbols that cannot be used in file
names.
* [new] Links to non-wiki files. Non wiki files are files with extensions ie
[[hello world.txt]] or [[my homesite.html]]
* [new] Strip [[complex wiki name]] from symbols that cannot be used in
file names.
* [new] Links to non-wiki files. Non wiki files are files with extensions
ie [[hello world.txt]] or [[my homesite.html]]
0.1
* First public version.
@ -1545,15 +1610,14 @@ it's free enough to suit your needs.
vim:tw=78:ts=8:ft=help:fdm=marker:
ftplugin/vimwiki.vim [[[1
98
97
" Vim filetype plugin file
" Language: Wiki
" Author: Maxim Kim (habamax at gmail dot com)
" Home: http://code.google.com/p/vimwiki/
" Filenames: *.wiki
" Last Change: 20.01.2009 11:21
" Version: 0.5.3
" Last Change: 29.01.2009 22:43
" Version: 0.6
if exists("b:did_ftplugin")
finish
endif
@ -1588,8 +1652,8 @@ setlocal fdm=syntax
setlocal commentstring=<!--%s-->
"" commands {{{2
command! -buffer Vimwiki2HTML call vimwiki#Wiki2HTML(g:vimwiki_home_html, expand('%'))
command! -buffer VimwikiAll2HTML call vimwiki#WikiAll2HTML(g:vimwiki_home_html)
command! -buffer Vimwiki2HTML call vimwiki#Wiki2HTML(expand(g:vimwiki_home_html), expand('%'))
command! -buffer VimwikiAll2HTML call vimwiki#WikiAll2HTML(expand(g:vimwiki_home_html))
command! -buffer VimwikiNextWord call vimwiki#WikiNextWord()
command! -buffer VimwikiPrevWord call vimwiki#WikiPrevWord()
@ -1645,15 +1709,14 @@ if g:vimwiki_smartCR==1
endif
" keybindings }}}
plugin/vimwiki.vim [[[1
75
79
" VimWiki plugin file
" Language: Wiki
" Author: Maxim Kim (habamax at gmail dot com)
" Home: http://code.google.com/p/vimwiki/
" Filenames: *.wiki
" Last Change: 20.01.2009 11:22
" Version: 0.5.3
" Last Change: 04.02.2009 12:26
" Version: 0.6
if exists("loaded_vimwiki") || &cp
finish
@ -1679,13 +1742,18 @@ call s:default('other','0-9_')
call s:default('maxhi','1')
call s:default('stripsym','_')
call s:default('smartCR',1)
call s:default('home_html',g:vimwiki_home."html/")
call s:default('syntax','default')
call s:default('gohome','split')
call s:default('home_html',g:vimwiki_home."html/")
call s:default('html_header',"")
call s:default('html_footer',"")
call s:default('history',[])
let g:vimwiki_home = expand(g:vimwiki_home)
let g:vimwiki_home_html = expand(g:vimwiki_home_html)
let g:vimwiki_html_header = expand(g:vimwiki_html_header)
let g:vimwiki_html_footer = expand(g:vimwiki_html_footer)
let upp = g:vimwiki_upper
let low = g:vimwiki_lower
@ -1722,15 +1790,14 @@ endif
noremap <unique><script> <Plug>VimwikiExploreHome :VimwikiExploreHome<CR>
syntax/vimwiki.vim [[[1
122
121
" Vim syntax file
" Language: Wiki
" Author: Maxim Kim (habamax at gmail dot com)
" Home: http://code.google.com/p/vimwiki/
" Filenames: *.wiki
" Last Change: 20.01.2009 11:22
" Version: 0.5.3
" Last Change: 29.01.2009 10:27
" Version: 0.6
" Quit if syntax file is already loaded
if version < 600
syntax clear
@ -1834,7 +1901,7 @@ hi def link wikiNoExistsWord Error
hi def link wikiPre PreProc
hi def link wikiLink Underlined
hi def link wikiList Type
hi def link wikiList Operator
hi def link wikiTable PreProc
hi def link wikiEmoticons Constant
hi def link wikiDelText Comment
@ -1846,15 +1913,14 @@ hi def link wikiTodo Todo
let b:current_syntax="vimwiki"
syntax/vimwiki_default.vim [[[1
66
65
" Vim syntax file
" Language: Wiki (vimwiki default)
" Author: Maxim Kim (habamax at gmail dot com)
" Home: http://code.google.com/p/vimwiki/
" Filenames: *.wiki
" Last Change: 20.01.2009 11:22
" Version: 0.5.3
" Last Change: 20.01.2009 19:47
" Version: 0.6
" text: *strong*
" let g:vimwiki_rxBold = '\*[^*]\+\*'
let g:vimwiki_rxBold = '\(^\|\s\+\|[[:punct:]]\)\zs\*[^*`]\+\*\ze\([[:punct:]]\|\s\+\|$\)'
@ -1914,15 +1980,14 @@ let g:vimwiki_rxFoldHeadingEnd = '\n\+\ze!'
" vim:tw=0:
syntax/vimwiki_google.vim [[[1
65
64
" Vim syntax file
" Language: Wiki
" Author: Maxim Kim (habamax at gmail dot com)
" Home: http://code.google.com/p/vimwiki/
" Filenames: *.wiki
" Last Change: 20.01.2009 11:22
" Version: 0.5.3
" Last Change: 20.01.2009 19:47
" Version: 0.6
" text: *strong*
" let g:vimwiki_rxBold = '\*[^*]\+\*'
let g:vimwiki_rxBold = '\(^\|\s\+\|[[:punct:]]\)\zs\*[^*`]\+\*\ze\([[:punct:]]\|\s\+\|$\)'
@ -1981,15 +2046,14 @@ let g:vimwiki_rxFoldHeadingEnd = '\n\ze=\+[^=]\+='
" vim:tw=0:
syntax/vimwiki_media.vim [[[1
60
59
" Vim syntax file
" Language: Wiki (MediaWiki)
" Author: Maxim Kim (habamax at gmail dot com)
" Home: http://code.google.com/p/vimwiki/
" Filenames: *.wiki
" Last Change: 20.01.2009 11:22
" Version: 0.5.3
" Last Change: 20.01.2009 19:47
" Version: 0.6
" text: '''strong'''
let g:vimwiki_rxBold = "'''[^']\\+'''"