diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-07-21 05:56:22 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-07-21 05:56:22 +0200 |
commit | a9604e61451707b38fdcb088fbfaeea2b922fef6 (patch) | |
tree | 0d7a758f4225fb7c02ba22c75b920894e890bdd5 /runtime/tutor/tutor.vim | |
parent | 872e451e8c326d5dd3062ef621fcbf0a4c5bef78 (diff) | |
download | vim-git-a9604e61451707b38fdcb088fbfaeea2b922fef6.tar.gz |
Update runtime files.
Diffstat (limited to 'runtime/tutor/tutor.vim')
-rw-r--r-- | runtime/tutor/tutor.vim | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/runtime/tutor/tutor.vim b/runtime/tutor/tutor.vim index f8a54965e..f450e773d 100644 --- a/runtime/tutor/tutor.vim +++ b/runtime/tutor/tutor.vim @@ -59,7 +59,7 @@ if s:ext =~? '\.en' let s:ext = "" endif -" The japanese tutor is available in two encodings, guess which one to use +" The Japanese tutor is available in three encodings, guess which one to use " The "sjis" one is actually "cp932", it doesn't matter for this text. if s:ext =~? '\.ja' if &enc =~ "euc" @@ -69,7 +69,7 @@ if s:ext =~? '\.ja' endif endif -" The korean tutor is available in two encodings, guess which one to use +" The Korean tutor is available in two encodings, guess which one to use if s:ext =~? '\.ko' if &enc != "utf-8" let s:ext = ".ko.euc" @@ -169,15 +169,6 @@ if s:ext =~? '\.hr' endif endif -" Esperanto is only available in utf-8 -if s:ext =~? '\.eo' - let s:ext = ".eo.utf-8" -endif -" Vietnamese is only available in utf-8 -if s:ext =~? '\.vi' - let s:ext = ".vi.utf-8" -endif - " If 'encoding' is utf-8 s:ext must end in utf-8. if &enc == 'utf-8' && s:ext !~ '\.utf-8' let s:ext .= '.utf-8' @@ -190,6 +181,9 @@ let s:tutorxx = $VIMRUNTIME . s:tutorfile . s:ext " 3. Finding the file: if filereadable(s:tutorxx) let $TUTOR = s:tutorxx +elseif s:ext !~ '\.utf-8' && filereadable(s:tutorxx . ".utf-8") + " Fallback to utf-8 if available. + let $TUTOR = s:tutorxx . ".utf-8" else let $TUTOR = $VIMRUNTIME . s:tutorfile echo "The file " . s:tutorxx . " does not exist.\n" |