From 5f9dbca89c593e710b0399d0ecc37c5b83d28d4f Mon Sep 17 00:00:00 2001 From: EinfachToll Date: Thu, 28 Jan 2016 10:52:40 +0100 Subject: [PATCH] Small cleanup of the merged PR Ref #187 --- autoload/vimwiki/base.vim | 2 +- doc/vimwiki.txt | 22 +++++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim index 0681c8a..f6f5772 100644 --- a/autoload/vimwiki/base.vim +++ b/autoload/vimwiki/base.vim @@ -1972,7 +1972,7 @@ function! vimwiki#base#detect_nested_syntax() "{{{ \ 'substitute(v:val, last_word, "\\=submatch(1)", "")') let dict = {} for elem in lines - exe "let dict.".elem." = elem" + let dict[elem] = elem endfor return dict endfunction "}}} diff --git a/doc/vimwiki.txt b/doc/vimwiki.txt index b5793ca..2c4f378 100644 --- a/doc/vimwiki.txt +++ b/doc/vimwiki.txt @@ -2017,16 +2017,24 @@ or in: > *vimwiki-option-automatic_nested_syntaxes* ------------------------------------------------------------------------------ -Key Default value~ -automatic_nested_syntaxes 1 +Key Default value~ +automatic_nested_syntaxes 1 Description~ -Allows for smaller |vimwiki-option-nested_syntaxes| dictionaries, by turning -entry for python on the previous example unnecessary: > - let wiki.nested_syntaxes = {'python': 'python', 'c++': 'cpp'} +If set, the nested syntaxes (|vimwiki-option-nested_syntaxes|) are +automatically derived when opening a buffer. +Just write your preformatted text in your file like this > + {{{xxx + my preformatted text + }}} -It requires that the file is reloaded (|:edit|) after new |filetype| is -included in a file. +where xxx is a Vim filetype. + +Note that you may have to reload the file (|:edit|) to see the highlight. + +Since every file is scanned for the markers of preformatted text when it is +opened, it can be slow when you have huge files. In this case, set this option +to 0. *vimwiki-option-diary_rel_path*