8e53e53ffe
* 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`
162 lines
5.6 KiB
VimL
162 lines
5.6 KiB
VimL
" vim:tabstop=2:shiftwidth=2:expandtab:foldmethod=marker:textwidth=79
|
|
" Vimwiki syntax file
|
|
" Author: Maxim Kim <habamax@gmail.com>
|
|
" Home: http://code.google.com/p/vimwiki/
|
|
|
|
" Quit if syntax file is already loaded
|
|
if version < 600
|
|
syntax clear
|
|
elseif exists("b:current_syntax")
|
|
finish
|
|
endif
|
|
|
|
"" use max highlighting - could be quite slow if there are too many wikifiles
|
|
if VimwikiGet('maxhi')
|
|
" Every WikiWord is nonexistent
|
|
if g:vimwiki_camel_case
|
|
execute 'syntax match VimwikiNoExistsLink /'.g:vimwiki_rxWikiWord.'/'
|
|
endif
|
|
execute 'syntax match VimwikiNoExistsLink /'.g:vimwiki_rxWikiLink1.'/'
|
|
execute 'syntax match VimwikiNoExistsLink /'.g:vimwiki_rxWikiLink2.'/'
|
|
" till we find them in vimwiki's path
|
|
call vimwiki#WikiHighlightLinks()
|
|
else
|
|
" A WikiWord (unqualifiedWikiName)
|
|
execute 'syntax match VimwikiLink /\<'.g:vimwiki_rxWikiWord.'\>/'
|
|
" A [[bracketed wiki word]]
|
|
execute 'syntax match VimwikiLink /'.g:vimwiki_rxWikiLink1.'/'
|
|
execute 'syntax match VimwikiLink /'.g:vimwiki_rxWikiLink2.'/'
|
|
endif
|
|
|
|
execute 'syntax match VimwikiLink `'.g:vimwiki_rxWeblink.'`'
|
|
|
|
" Emoticons
|
|
syntax match VimwikiEmoticons /\%((.)\|:[()|$@]\|:-[DOPS()\]|$@]\|;)\|:'(\)/
|
|
|
|
let g:vimwiki_rxTodo = '\C\%(TODO:\|DONE:\|STARTED:\|FIXME:\|FIXED:\|XXX:\)'
|
|
execute 'syntax match VimwikiTodo /'. g:vimwiki_rxTodo .'/'
|
|
|
|
" Load concrete Wiki syntax
|
|
execute 'runtime! syntax/vimwiki_'.VimwikiGet('syntax').'.vim'
|
|
|
|
" Tables
|
|
" execute 'syntax match VimwikiTable /'.g:vimwiki_rxTable.'/'
|
|
syntax match VimwikiTableRow /\s*|.\+|\s*/
|
|
\ transparent contains=VimwikiCellSeparator,VimwikiLink,
|
|
\ VimwikiNoExistsLink,VimwikiEmoticons,VimwikiTodo,
|
|
\ VimwikiBold,VimwikiItalic,VimwikiBoldItalic,VimwikiItalicBold,
|
|
\ VimwikiDelText,VimwikiSuperScript,VimwikiSubScript,VimwikiCode
|
|
syntax match VimwikiCellSeparator
|
|
\ /\%(|\)\|\%(-\@<=+\-\@=\)\|\%([|+]\@<=-\+\)/ contained
|
|
|
|
" List items
|
|
execute 'syntax match VimwikiList /'.g:vimwiki_rxListBullet.'/'
|
|
execute 'syntax match VimwikiList /'.g:vimwiki_rxListNumber.'/'
|
|
execute 'syntax match VimwikiList /'.g:vimwiki_rxListDefine.'/'
|
|
|
|
execute 'syntax match VimwikiBold /'.g:vimwiki_rxBold.'/'
|
|
|
|
execute 'syntax match VimwikiItalic /'.g:vimwiki_rxItalic.'/'
|
|
|
|
execute 'syntax match VimwikiBoldItalic /'.g:vimwiki_rxBoldItalic.'/'
|
|
|
|
execute 'syntax match VimwikiItalicBold /'.g:vimwiki_rxItalicBold.'/'
|
|
|
|
execute 'syntax match VimwikiDelText /'.g:vimwiki_rxDelText.'/'
|
|
|
|
execute 'syntax match VimwikiSuperScript /'.g:vimwiki_rxSuperScript.'/'
|
|
|
|
execute 'syntax match VimwikiSubScript /'.g:vimwiki_rxSubScript.'/'
|
|
|
|
execute 'syntax match VimwikiCode /'.g:vimwiki_rxCode.'/'
|
|
|
|
" <hr> horizontal rule
|
|
execute 'syntax match VimwikiHR /'.g:vimwiki_rxHR.'/'
|
|
|
|
execute 'syntax region VimwikiPre start=/'.g:vimwiki_rxPreStart.
|
|
\ '/ end=/'.g:vimwiki_rxPreEnd.'/ contains=VimwikiComment'
|
|
|
|
" List item checkbox
|
|
syntax match VimwikiCheckBox /\[.\?\]/
|
|
if g:vimwiki_hl_cb_checked
|
|
execute 'syntax match VimwikiCheckBoxDone /'.
|
|
\ g:vimwiki_rxListBullet.'\s*\['.g:vimwiki_listsyms[4].'\].*$/'.
|
|
\ ' contains=VimwikiNoExistsLink,VimwikiLink'
|
|
execute 'syntax match VimwikiCheckBoxDone /'.
|
|
\ g:vimwiki_rxListNumber.'\s*\['.g:vimwiki_listsyms[4].'\].*$/'.
|
|
\ ' contains=VimwikiNoExistsLink,VimwikiLink'
|
|
endif
|
|
|
|
" placeholders
|
|
syntax match VimwikiPlaceholder /^\s*%toc\%(\s.*\)\?$/
|
|
syntax match VimwikiPlaceholder /^\s*%nohtml\s*$/
|
|
|
|
" html tags
|
|
syntax match VimwikiHTMLtag '<br\s*/\?>'
|
|
syntax match VimwikiHTMLtag '<hr\s*/\?>'
|
|
|
|
syntax region VimwikiComment start='<!--' end='-->'
|
|
|
|
if !vimwiki#hl_exists("VimwikiHeader1")
|
|
execute 'syntax match VimwikiHeader /'.g:vimwiki_rxHeader.'/ contains=VimwikiTodo'
|
|
else
|
|
" Header levels, 1-6
|
|
execute 'syntax match VimwikiHeader1 /'.g:vimwiki_rxH1.'/ contains=VimwikiTodo'
|
|
execute 'syntax match VimwikiHeader2 /'.g:vimwiki_rxH2.'/ contains=VimwikiTodo'
|
|
execute 'syntax match VimwikiHeader3 /'.g:vimwiki_rxH3.'/ contains=VimwikiTodo'
|
|
execute 'syntax match VimwikiHeader4 /'.g:vimwiki_rxH4.'/ contains=VimwikiTodo'
|
|
execute 'syntax match VimwikiHeader5 /'.g:vimwiki_rxH5.'/ contains=VimwikiTodo'
|
|
execute 'syntax match VimwikiHeader6 /'.g:vimwiki_rxH6.'/ contains=VimwikiTodo'
|
|
endif
|
|
|
|
" group names "{{{
|
|
if !vimwiki#hl_exists("VimwikiHeader1")
|
|
hi def link VimwikiHeader Title
|
|
else
|
|
hi def link VimwikiHeader1 Title
|
|
hi def link VimwikiHeader2 Title
|
|
hi def link VimwikiHeader3 Title
|
|
hi def link VimwikiHeader4 Title
|
|
hi def link VimwikiHeader5 Title
|
|
hi def link VimwikiHeader6 Title
|
|
endif
|
|
|
|
hi def VimwikiBold term=bold cterm=bold gui=bold
|
|
hi def VimwikiItalic term=italic cterm=italic gui=italic
|
|
hi def VimwikiBoldItalic term=bold cterm=bold gui=bold,italic
|
|
hi def link VimwikiItalicBold VimwikiBoldItalic
|
|
|
|
hi def link VimwikiCode PreProc
|
|
hi def link VimwikiNoExistsLink Error
|
|
|
|
hi def link VimwikiPre PreProc
|
|
hi def link VimwikiLink Underlined
|
|
hi def link VimwikiList Function
|
|
hi def link VimwikiCheckBox VimwikiList
|
|
hi def link VimwikiCheckBoxDone Comment
|
|
hi def link VimwikiEmoticons Character
|
|
hi def link VimwikiDelText Constant
|
|
hi def link VimwikiSuperScript Number
|
|
hi def link VimwikiSubScript Number
|
|
hi def link VimwikiTodo Todo
|
|
hi def link VimwikiComment Comment
|
|
|
|
hi def link VimwikiCellSeparator SpecialKey
|
|
hi def link VimwikiPlaceholder SpecialKey
|
|
hi def link VimwikiHTMLtag SpecialKey
|
|
"}}}
|
|
|
|
let b:current_syntax="vimwiki"
|
|
|
|
" EMBEDDED syntax setup "{{{
|
|
let nested = VimwikiGet('nested_syntaxes')
|
|
if !empty(nested)
|
|
for [hl_syntax, vim_syntax] in items(nested)
|
|
call vimwiki#nested_syntax(vim_syntax,
|
|
\ '^{{{\%(.*[[:blank:][:punct:]]\)\?'.
|
|
\ hl_syntax.'\%([[:blank:][:punct:]].*\)\?',
|
|
\ '^}}}', 'VimwikiPre')
|
|
endfor
|
|
endif
|
|
"}}}
|