Merge branch 'new-lists' of github.com:vimwiki/vimwiki into new-lists
This commit is contained in:
@ -1424,8 +1424,7 @@ endfunction " }}}
|
||||
" arguments rxUrl, rxDesc, and rxStyle are copied verbatim, without any
|
||||
" special character escapes or substitutions.
|
||||
function! vimwiki#base#apply_template(template, rxUrl, rxDesc, rxStyle) "{{{
|
||||
let magic_chars = '.*[\^$'
|
||||
let lnk = escape(a:template, magic_chars)
|
||||
let lnk = vimwiki#u#escape(a:template)
|
||||
if a:rxUrl != ""
|
||||
let lnk = substitute(lnk, '__LinkUrl__', '\='."'".a:rxUrl."'", '')
|
||||
endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -447,7 +447,7 @@ endfunction "}}}
|
||||
function! vimwiki#tbl#kbd_cr() "{{{
|
||||
let lnum = line('.')
|
||||
if !s:is_table(getline(lnum))
|
||||
return "\<CR>"
|
||||
return ""
|
||||
endif
|
||||
|
||||
if s:is_separator(getline(lnum+1)) || !s:is_table(getline(lnum+1))
|
||||
@ -507,9 +507,14 @@ function! vimwiki#tbl#format(lnum, ...) "{{{
|
||||
endif
|
||||
|
||||
let indent = s:get_indent(a:lnum)
|
||||
if &expandtab
|
||||
let indentstring = repeat(' ', indent)
|
||||
else
|
||||
let indentstring = repeat(' ', indent / &tabstop) . repeat(' ', indent % &tabstop)
|
||||
endif
|
||||
|
||||
for [lnum, row] in s:get_aligned_rows(a:lnum, col1, col2)
|
||||
let row = repeat(' ', indent).row
|
||||
let row = indentstring.row
|
||||
call setline(lnum, row)
|
||||
endfor
|
||||
|
||||
|
@ -75,3 +75,16 @@ function! vimwiki#u#path_common_pfx(path1, path2) "{{{
|
||||
endif
|
||||
endfunction "}}}
|
||||
|
||||
function! vimwiki#u#escape(string) "{{{
|
||||
return escape(a:string, '.*[]\^$')
|
||||
endfunction "}}}
|
||||
|
||||
" Load concrete Wiki syntax: sets regexes and templates for headers and links
|
||||
function vimwiki#u#reload_regexes() "{{{
|
||||
execute 'runtime! syntax/vimwiki_'.VimwikiGet('syntax').'.vim'
|
||||
endfunction "}}}
|
||||
|
||||
" Load syntax-specific functionality
|
||||
function vimwiki#u#reload_regexes_custom() "{{{
|
||||
execute 'runtime! syntax/vimwiki_'.VimwikiGet('syntax').'_custom.vim'
|
||||
endfunction "}}}
|
||||
|
Reference in New Issue
Block a user