Fix encoding of vim files

This commit is contained in:
Adam Stankiewicz
2020-10-08 08:31:09 +02:00
parent bb3de8fa5e
commit 1993b9f68f
22 changed files with 30 additions and 26 deletions

View File

@@ -16,7 +16,7 @@ let b:did_ftplugin = 1
let s:cpo_save = &cpo let s:cpo_save = &cpo
set cpo&vim set cpo&vim
setlocal softtabstop=4 shiftwidth=4 encoding=utf-8 setlocal softtabstop=4 shiftwidth=4
setlocal suffixesadd=.fal,.ftd setlocal suffixesadd=.fal,.ftd
" Matchit support " Matchit support

View File

@@ -524,7 +524,7 @@ endfunction
"c. link this stuff with what the user wants "c. link this stuff with what the user wants
" ie. get the expression selected/under the cursor " ie. get the expression selected/under the cursor
let s:ocaml_word_char = '\w|[<EFBFBD>-<2D>]|''' let s:ocaml_word_char = '\w|[\u00ac-\uffff]|'''
"In: the current mode (eg. "visual", "normal", etc.) "In: the current mode (eg. "visual", "normal", etc.)
"Out: the borders of the expression we are looking for the type "Out: the borders of the expression we are looking for the type

View File

@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rpl') == -1
" Vim filetype plugin file " Vim filetype plugin file
" Language: RPL/2 " Language: RPL/2
" Maintainer: Jo<EFBFBD>l BERTRAND <rpl2@free.fr> " Maintainer: Joël BERTRAND <rpl2@free.fr>
" Last Change: 2012 Mar 07 " Last Change: 2012 Mar 07
" Version: 0.1 " Version: 0.1

View File

@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rpl') == -1
" Language: RPL/2 " Language: RPL/2
" Version: 0.2 " Version: 0.2
" Last Change: 2017 Jun 13 " Last Change: 2017 Jun 13
" Maintainer: BERTRAND Jo<EFBFBD>l <rpl2@free.fr> " Maintainer: BERTRAND Joël <rpl2@free.fr>
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
if exists("b:did_indent") if exists("b:did_indent")

View File

@@ -1,7 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tilde') == -1 if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tilde') == -1
"Description: Indent scheme for the tilde weblanguage "Description: Indent scheme for the tilde weblanguage
"Author: Tobias Rundstr<EFBFBD>m <tobi@tobi.nu> "Author: Tobias Rundström <tobi@tobi.nu>
"URL: http://tilde.tildesoftware.net "URL: http://tilde.tildesoftware.net
"Last Change: May 8 09:15:09 CEST 2002 "Last Change: May 8 09:15:09 CEST 2002

View File

@@ -275,10 +275,14 @@ def copy_file(package, src, dest)
output << "if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, '#{name}') == -1\n\n" output << "if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, '#{name}') == -1\n\n"
end end
contents = File.read(input) contents = File.read(input)
# fix encoding if required
contents.gsub!(/!@#%#/, "") rescue contents = contents.force_encoding('iso-8859-1').encode('utf-8')
# ..= is feature of new vims... # ..= is feature of new vims...
contents.gsub!(' ..= ', ' .= ') contents.gsub!(' ..= ', ' .= ')
# https://github.com/vim/vim/pull/7091 # https://github.com/vim/vim/pull/7091
contents.gsub!('fileencoding=', 'encoding=') contents.gsub!(/set(local)? fileencoding=utf-8/, '')
contents.gsub!(/ fileencoding=utf-8/, '')
contents.gsub!('À-ÿ', '\u00ac-\uffff')
output << contents output << contents
output << "\nendif\n" output << "\nendif\n"
end end
@@ -476,8 +480,8 @@ def extract(packages)
globs = [package.fetch("glob", package.fetch('globs', '**/*.{vim,ctags,vital,txt}'))].flatten globs = [package.fetch("glob", package.fetch('globs', '**/*.{vim,ctags,vital,txt}'))].flatten
globs.each do |glob| globs.each do |glob|
Dir.glob("#{subdir}/#{glob}", base: subtree).each do |p| Dir.glob("#{subdir}/#{glob}", base: subtree).each do |p|
next unless File.file?("#{subtree}/#{p}") next unless File.file?("#{subtree}#{p}")
copy_file(package, "#{subtree}/#{p}", p) copy_file(package, "#{subtree}#{p}", p)
end end
end end
elsif File.exist?(subpath) elsif File.exist?(subpath)

View File

@@ -63,7 +63,7 @@ syn match cssClassName "\.-\=[A-Za-z_][A-Za-z0-9_-]*" contains=cssClassNameDot
syn match cssClassNameDot contained '\.' syn match cssClassNameDot contained '\.'
try try
syn match cssIdentifier "#[A-Za-z<EFBFBD>-<2D>_@][A-Za-z<>-<2D>0-9_@-]*" syn match cssIdentifier "#[A-Za-z\u00ac-\uffff_@][A-Za-z\u00ac-\uffff0-9_@-]*"
catch /^.*/ catch /^.*/
syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*" syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*"
endtry endtry

View File

@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elf') == -1
" Vim syntax file " Vim syntax file
" Language: ELF " Language: ELF
" Maintainer: Christian V. J. Br<EFBFBD>ssow <cvjb@cvjb.de> " Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
" Last Change: Son 22 Jun 2003 20:43:14 CEST " Last Change: Son 22 Jun 2003 20:43:14 CEST
" Filenames: *.ab,*.am " Filenames: *.ab,*.am
" URL: http://www.cvjb.de/comp/vim/elf.vim " URL: http://www.cvjb.de/comp/vim/elf.vim

View File

@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'forth') == -1
" Vim syntax file " Vim syntax file
" Language: FORTH " Language: FORTH
" Current Maintainer: Johan Kotlinski <kotlinski@gmail.com> " Current Maintainer: Johan Kotlinski <kotlinski@gmail.com>
" Previous Maintainer: Christian V. J. Br<EFBFBD>ssow <cvjb@cvjb.de> " Previous Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
" Last Change: 2018-03-29 " Last Change: 2018-03-29
" Filenames: *.fs,*.ft " Filenames: *.fs,*.ft
" URL: https://github.com/jkotlinski/forth.vim " URL: https://github.com/jkotlinski/forth.vim

View File

@@ -12,9 +12,9 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fortran') == -1
" Fortran 77 syntax file by Mario Eusebio and Preben Guldberg. " Fortran 77 syntax file by Mario Eusebio and Preben Guldberg.
" Since then, useful suggestions and contributions have been made, in order, by: " Since then, useful suggestions and contributions have been made, in order, by:
" Andrej Panjkov, Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile, " Andrej Panjkov, Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile,
" Walter Dieudonn<EFBFBD>, Alexander Wagner, Roman Bertle, Charles Rendleman, " Walter Dieudonné, Alexander Wagner, Roman Bertle, Charles Rendleman,
" Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, Jan Hermann, " Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, Jan Hermann,
" Stefano Zaghi, Vishnu V. Krishnan, Judica<EFBFBD>l Grasset, and Takuma Yoshida " Stefano Zaghi, Vishnu V. Krishnan, Judicaël Grasset, and Takuma Yoshida
if exists("b:current_syntax") if exists("b:current_syntax")
finish finish

View File

@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'initng') == -1
" Vim syntax file " Vim syntax file
" Language: initng .i files " Language: initng .i files
" Maintainer: Elan Ruusam<EFBFBD>e <glen@pld-linux.org> " Maintainer: Elan Ruusamäe <glen@pld-linux.org>
" URL: http://glen.alkohol.ee/pld/initng/ " URL: http://glen.alkohol.ee/pld/initng/
" License: GPL v2 " License: GPL v2
" Version: 0.13 " Version: 0.13

View File

@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'iss') == -1
" Vim syntax file " Vim syntax file
" Language: Inno Setup File (iss file) and My InnoSetup extension " Language: Inno Setup File (iss file) and My InnoSetup extension
" Maintainer: Jason Mills (jmills@cs.mun.ca) " Maintainer: Jason Mills (jmills@cs.mun.ca)
" Previous Maintainer: Dominique St<EFBFBD>phan (dominique@mggen.com) " Previous Maintainer: Dominique Stéphan (dominique@mggen.com)
" Last Change: 2019 Sep 27 " Last Change: 2019 Sep 27
" "
" Todo: " Todo:

View File

@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lout') == -1
" Vim syntax file " Vim syntax file
" Language: Lout " Language: Lout
" Maintainer: Christian V. J. Br<EFBFBD>ssow <cvjb@cvjb.de> " Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
" Last Change: So 12 Feb 2012 15:15:03 CET " Last Change: So 12 Feb 2012 15:15:03 CET
" Filenames: *.lout,*.lt " Filenames: *.lout,*.lt
" URL: http://www.cvjb.de/comp/vim/lout.vim " URL: http://www.cvjb.de/comp/vim/lout.vim

View File

@@ -97,7 +97,7 @@ if exists("moo_unknown_builtin_functions")
syn keyword mooKnownBuiltinFunction abs acos add_property add_verb asin atan binary_hash boot_player buffered_output_length callers caller_perms call_function ceil children chparent clear_property connected_players connected_seconds connection_name connection_option connection_options cos cosh create crypt ctime db_disk_size decode_binary delete_property delete_verb disassemble dump_database encode_binary equal eval exp floatstr floor flush_input force_input function_info idle_seconds index is_clear_property is_member is_player kill_task length listappend listdelete listen listeners listinsert listset log log10 match max max_object memory_usage min move notify object_bytes open_network_connection output_delimiters parent pass players properties property_info queued_tasks queue_info raise random read recycle renumber reset_max_object resume rindex rmatch seconds_left server_log server_version setadd setremove set_connection_option set_player_flag set_property_info set_task_perms set_verb_args set_verb_code set_verb_info shutdown sin sinh sqrt strcmp string_hash strsub substitute suspend tan tanh task_id task_stack ticks_left time tofloat toint toliteral tonum toobj tostr trunc typeof unlisten valid value_bytes value_hash verbs verb_args verb_code verb_info contained syn keyword mooKnownBuiltinFunction abs acos add_property add_verb asin atan binary_hash boot_player buffered_output_length callers caller_perms call_function ceil children chparent clear_property connected_players connected_seconds connection_name connection_option connection_options cos cosh create crypt ctime db_disk_size decode_binary delete_property delete_verb disassemble dump_database encode_binary equal eval exp floatstr floor flush_input force_input function_info idle_seconds index is_clear_property is_member is_player kill_task length listappend listdelete listen listeners listinsert listset log log10 match max max_object memory_usage min move notify object_bytes open_network_connection output_delimiters parent pass players properties property_info queued_tasks queue_info raise random read recycle renumber reset_max_object resume rindex rmatch seconds_left server_log server_version setadd setremove set_connection_option set_player_flag set_property_info set_task_perms set_verb_args set_verb_code set_verb_info shutdown sin sinh sqrt strcmp string_hash strsub substitute suspend tan tanh task_id task_stack ticks_left time tofloat toint toliteral tonum toobj tostr trunc typeof unlisten valid value_bytes value_hash verbs verb_args verb_code verb_info contained
endif endif
"<EFBFBD>Enclosed expressions " Enclosed expressions
syn match mooUnenclosedError display ~[')\]|}]~ syn match mooUnenclosedError display ~[')\]|}]~
syn match mooParenthesesError display ~[';\]|}]~ contained syn match mooParenthesesError display ~[';\]|}]~ contained
syn region mooParentheses start=~(~ end=~)~ transparent contains=@mooEnclosedContents,mooParenthesesError syn region mooParentheses start=~(~ end=~)~ transparent contains=@mooEnclosedContents,mooParenthesesError

View File

@@ -14,7 +14,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'n1ql') == -1
" Questions, comments: <n1ql AT cime.net> " Questions, comments: <n1ql AT cime.net>
" https://ciurana.eu/pgp, https://keybase.io/pr3d4t0r " https://ciurana.eu/pgp, https://keybase.io/pr3d4t0r
" "
" vim: set encoding=utf-8: " vim: :
if exists("b:current_syntax") if exists("b:current_syntax")

View File

@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nroff') == -1
" VIM syntax file " VIM syntax file
" Language: nroff/groff " Language: nroff/groff
" Maintainer: Pedro Alejandro L<EFBFBD>pez-Valencia <palopezv@gmail.com> " Maintainer: Pedro Alejandro López-Valencia <palopezv@gmail.com>
" URL: http://vorbote.wordpress.com/ " URL: http://vorbote.wordpress.com/
" Last Change: 2012 Feb 2 " Last Change: 2012 Feb 2
" "
@@ -10,7 +10,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nroff') == -1
" "
" ACKNOWLEDGEMENTS: " ACKNOWLEDGEMENTS:
" "
" My thanks to J<EFBFBD>r<EFBFBD>me Pl<EFBFBD>t <Jerome.Plut@ens.fr>, who was the " My thanks to Jérôme Plût <Jerome.Plut@ens.fr>, who was the
" creator and maintainer of this syntax file for several years. " creator and maintainer of this syntax file for several years.
" May I be as good at it as he has been. " May I be as good at it as he has been.
" "

View File

@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pascal') == -1
" Language: Pascal " Language: Pascal
" Version: 2.8 " Version: 2.8
" Last Change: 2004/10/17 17:47:30 " Last Change: 2004/10/17 17:47:30
" Maintainer: Xavier Cr<EFBFBD>gut <xavier.cregut@enseeiht.fr> " Maintainer: Xavier Crégut <xavier.cregut@enseeiht.fr>
" Previous Maintainer: Mario Eusebio <bio@dq.fct.unl.pt> " Previous Maintainer: Mario Eusebio <bio@dq.fct.unl.pt>
" Contributors: Tim Chase <tchase@csc.com>, " Contributors: Tim Chase <tchase@csc.com>,

View File

@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'r-lang') == -1
" Vim syntax file " Vim syntax file
" Language: R noweb Files " Language: R noweb Files
" Maintainer: Johannes Ranke <jranke@uni-bremen.de> " Maintainer: Johannes Ranke <jranke@uni-bremen.de>
" Last Change: 2007 M<EFBFBD>r 30 " Last Change: 2007 Mär 30
" Version: 0.8 " Version: 0.8
" SVN: $Id: rnoweb.vim 69 2007-03-30 08:55:36Z ranke $ " SVN: $Id: rnoweb.vim 69 2007-03-30 08:55:36Z ranke $
" Remarks: - This file is inspired by the proposal of " Remarks: - This file is inspired by the proposal of

View File

@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'robots') == -1
" Vim syntax file " Vim syntax file
" Language: "Robots.txt" files " Language: "Robots.txt" files
" Robots.txt files indicate to WWW robots which parts of a web site should not be accessed. " Robots.txt files indicate to WWW robots which parts of a web site should not be accessed.
" Maintainer: Dominique St<EFBFBD>phan (dominique@mggen.com) " Maintainer: Dominique Stéphan (dominique@mggen.com)
" URL: http://www.mggen.com/vim/syntax/robots.zip " URL: http://www.mggen.com/vim/syntax/robots.zip
" Last change: 2001 May 09 " Last change: 2001 May 09

View File

@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rpl') == -1
" Language: RPL/2 " Language: RPL/2
" Version: 0.15.15 against RPL/2 version 4.00pre7i " Version: 0.15.15 against RPL/2 version 4.00pre7i
" Last Change: 2012 Feb 03 by Thilo Six " Last Change: 2012 Feb 03 by Thilo Six
" Maintainer: Jo<EFBFBD>l BERTRAND <rpl2@free.fr> " Maintainer: Joël BERTRAND <rpl2@free.fr>
" URL: http://www.makalis.fr/~bertrand/rpl2/download/vim/indent/rpl.vim " URL: http://www.makalis.fr/~bertrand/rpl2/download/vim/indent/rpl.vim
" Credits: Nothing " Credits: Nothing

View File

@@ -9,7 +9,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rtf') == -1
" .hlp (windows help files) use compiled rtf files " .hlp (windows help files) use compiled rtf files
" rtf documentation at http://night.primate.wisc.edu/software/RTF/ " rtf documentation at http://night.primate.wisc.edu/software/RTF/
" "
" Maintainer: Dominique St<EFBFBD>phan (dominique@mggen.com) " Maintainer: Dominique Stéphan (dominique@mggen.com)
" URL: http://www.mggen.com/vim/syntax/rtf.zip " URL: http://www.mggen.com/vim/syntax/rtf.zip
" Last change: 2001 Mai 02 " Last change: 2001 Mai 02

View File

@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tilde') == -1
" Vim syntax file " Vim syntax file
" This file works only for Vim6.x " This file works only for Vim6.x
" Language: Tilde " Language: Tilde
" Maintainer: Tobias Rundstr<EFBFBD>m <tobi@tildesoftware.net> " Maintainer: Tobias Rundström <tobi@tildesoftware.net>
" URL: http://www.tildesoftware.net " URL: http://www.tildesoftware.net
" CVS: $Id: tilde.vim,v 1.1 2004/06/13 19:31:51 vimboss Exp $ " CVS: $Id: tilde.vim,v 1.1 2004/06/13 19:31:51 vimboss Exp $