Commit Graph

52 Commits

Author SHA1 Message Date
Christian Clason
d1bdeacb00 vim-patch:8e25d91: runtime(dist): verify that executable is in $PATH
Otherwise, if the executable to be verified does not exist,
this would cause a false-positive in the 'IsSafeExecutable()' check,
because 'exepath(executable)' returns an empty string and
'fnamemodify('', ':p:h')' returns the current directory and as a result
the 'IsSafeExecutable()' returns false (for the wrong reason).

8e25d91cb7

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-08-18 01:19:01 +02:00
Christian Clason
dcf5999fcd vim-patch:b2a4c110a5d1
runtime(dist): Make dist/vim.vim work properly when lacking vim9script support (vim/vim#13487)

`:return` cannot be used outside of `:function` (or `:def`) in older Vims
lacking Vim9script support or in Neovim, even when evaluation is being skipped
in the dead `:else` branch.

Instead, use the pattern described in `:h vim9-mix`, which uses `:finish` to end
script processing before it reaches the vim9script stuff.

b2a4c110a5

Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
2023-11-05 21:52:02 +01:00
Christian Clason
2a47dbe228 vim-patch:4f174f0de90b
runtime(dist): add legacy version for central vim library

Also, enable the zip and gzip plugins by default, unless those variables
were not explicitly set by the user.

related: vim/vim#13413

4f174f0de9

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-11-05 21:52:02 +01:00
Christian Clason
26cdff0e92 vim-patch:cd8a3eaf5348
runtime(dist): centralize safe executable check and add vim library (vim/vim#13413)

Follow up to 816fbcc26 (patch 9.0.1833: [security] runtime file fixes,
2023-08-31) and f7ac0ef50 (runtime: don't execute external commands when
loading ftplugins, 2023-09-06).

This puts the logic for safe executable checks in a single place, by introducing
a central vim library, so all filetypes benefit from consistency.

Notable changes:
- dist#vim because the (autoload) namespace for a new runtime support
  library. Supporting functions should get documentation. It might make
  life easier for NeoVim devs to make the documentation a new file
  rather than cram it into existing files, though we may want
  cross-references to it somewhere…
- The gzip and zip plugins need to be opted into by enabling execution
  of those programs (or the global plugin_exec). This needs
  documentation or discussion.
- This fixes a bug in the zig plugin: code setting s:tmp_cwd was removed
  in f7ac0ef50 (runtime: don't execute external commands when loading
  ftplugins, 2023-09-06), but the variable was still referenced. Since
  the new function takes care of that automatically, the variable is no
  longer needed.

cd8a3eaf53

Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
2023-11-05 21:52:02 +01:00
Christian Clason
042eb74ff1
feat(runtime)!: remove filetype.vim (#20428)
Made obsolete by now graduated `filetype.lua` (enabled by default).

Note that changes or additions to the filetype detection still need to
be made through a PR to vim/vim as we port the _logic_ as well as tests.
2022-10-17 08:52:40 +02:00
Jonas Strittmatter
d44f088834
vim-patch:9.0.0771: cannot always tell the difference beween tex and … (#20687)
vim-patch:9.0.0771: cannot always tell the difference beween tex and rexx files

Problem:    Cannot always tell the difference beween tex and rexx files.
Solution:   Recognize tex by a leading backslash. (Martin Tournoij,
            closes vim/vim#11380)
bd053f894b
2022-10-17 08:18:57 +02:00
Jonas Strittmatter
ce80b8f50d
vim-patch:9.0.0349: filetype of *.sil files not well detected (#20050)
Problem:    Filetype of *.sil files not well detected.
Solution:   Inspect the file contents to guess the filetype.
be807d5824
2022-09-02 08:16:17 +02:00
Christian Clason
a5e846b996
vim-patch:partial: 48c3f4e0bff7 (#19684)
vim-patch:partial:48c3f4e0bff7

Update runtime files
48c3f4e0bf

partially skip `options.txt` (needs 9.0.0138)
2022-08-09 10:43:28 +02:00
Gregory Anders
9b447c7ce5
vim-patch:9.0.0088: pattern for detecting bitbake files is not sufficient (#19547)
Problem:    Pattern for detecting bitbake files is not sufficient.
Solution:   Adjust the pattern. (Gregory Anders, closes vim/vim#10743)
30e212dac1
2022-07-27 10:06:09 -06:00
Gregory Anders
5ccdf6a88d
vim-patch:9.0.0055 (#19392)
vim-patch:9.0.0055: bitbake files are not detected

Problem:    Bitbake files are not detected.
Solution:   Add bitbake filetype detection by file name and contents. (Gregory
            Anders, closes vim/vim#10697)
fa49eb4827
2022-07-17 14:33:51 +02:00
Christian Clason
60604d6a99
vim-patch:9.0.0012: signature files not detected properly (#19172)
Problem:    Signature files not detected properly.
Solution:   Add a function to better detect signature files. (Doug Kearns)
cdbfc6dbab
2022-07-01 07:08:44 +02:00
Christian Clason
1eb9624666
vim-patch:9.0.0006: not all Visual Basic files are recognized (#19153)
Problem:    Not all Visual Basic files are recognized.
Solution:   Change detection of *.cls files. (Doug Kearns)
8b5901e2f9
2022-06-29 18:43:56 +02:00
Christian Clason
0124a7bfa9
vim-patch:75ab590f8504 (#18170)
Update runtime files
75ab590f85

omit builtin.txt change to `expand()` (depends on 8.2.4726)
2022-04-19 15:14:17 +02:00
Christian Clason
670ecfc0cd
vim-patch:8.2.4766: KRL files using "deffct" not recognized (#18137)
Problem:    KRL files using "deffct" not recognized.
Solution:   Adjust the pattern used for matching. (Patrick Meiser-Knosowski,
            closes vim/vim#10200)
93c7a45e86
2022-04-17 10:15:41 +02:00
Christian Clason
8486c87e58
vim-patch:8.2.4747: no filetype override for .sys files (#18105)
Problem:    No filetype override for .sys files.
Solution:   Add g:filetype_sys. (Patrick Meiser-Knosowski, closes vim/vim#10181)
f420ff2440
2022-04-13 23:11:56 +02:00
Christian Clason
9938740ca6
vim-patch:8.2.4746: supercollider filetype not recognized (#18102)
Problem:    Supercollider filetype not recognized.
Solution:   Match file extentions and check file contents to detect
            supercollider. (closes vim/vim#10142)
8cac20ed42
2022-04-13 17:04:38 +02:00
Christian Clason
3280dc2b60
vim-patch:8.2.4720: ABB Rapid files are not recognized properly (#18057)
Problem:    ABB Rapid files are not recognized properly.
Solution:   Add checks for ABB Rapid files. (Patrick Meiser-Knosowski,
            closes #10104)
b09c320039
2022-04-09 17:42:46 +02:00
Christian Clason
d3068d34cc
vim-patch:partial:cbaff5e06ec5 (#18042)
Update runtime files
cbaff5e06e

omit doc updates here
2022-04-08 19:53:41 +02:00
Christian Clason
f85f4e25d2
vim-patch:8.2.4701: Kuka Robot Language files not recognized (#18012)
Problem:    Kuka Robot Language files not recognized.
Solution:   Recognize *.src and *.dat files. (Patrick Meiser-Knosowski,
            closes vim/vim#10096)
3ad2090316
2022-04-07 09:09:08 +02:00
Christian Clason
a681b5eaca
vim-patch:partial 1588bc8ebee2 (#17656)
Update runtime files
1588bc8ebe

omit: doc updates
2022-03-09 08:40:16 +01:00
Christian Clason
9d3370a144
vim-patch:c51cf0329809 (#17530)
Update runtime files.
c51cf03298
2022-02-27 11:56:30 +01:00
Christian Clason
d0f8f76224
vim-patch:8.2.4464: Dtrace files are recognized as filetype D (#17518)
Problem:    Dtrace files are recognized as filetype D.
Solution:   Add a pattern for Dtrace files. (Teubel György, closes vim/vim#9841)
            Add some more testing.
4d56b971cb
2022-02-26 14:01:37 +01:00
Christian Clason
05f38bbede vim-patch:8.2.4305: tex filetype detection fails
Problem:    Tex filetype detection fails.
Solution:   Check value to be positive. (closes vim/vim#9704)
e5b7897585
2022-02-06 12:10:09 +01:00
Christian Clason
a562b5771e
vim-patch:8.2.4274: Basic and form filetype detection is incomplete (#17259)
Problem:    Basic and form filetype detection is incomplete.
Solution:   Add a separate function for .frm files. (Doug Kearns, closes vim/vim#9675)
c570e9cf68
2022-02-01 08:35:28 +01:00
Christian Clason
bddce4b0ff
vim-patch:c4573eb12dba (#17258)
Update runtime files
c4573eb12d
2022-01-31 18:09:51 +01:00
Christian Clason
79b92da0d2
vim-patch:partial:f10911e5db16 (#17248)
Update runtime files
f10911e5db
2022-01-31 15:27:01 +01:00
Christian Clason
5b9980f01e vim-patch:8.2.4238: *.tf file could be fileytpe "tf" or "terraform"
Problem:    *.tf file could be fileytpe "tf" or "terraform".
Solution:   Detect the type from the file contents. (closes vim/vim#9642)
bd8168c770
2022-01-28 17:01:13 +01:00
Christian Clason
9d02fc4c00
vim-patch:8.2.4172: filetype detection for BASIC is not optimal (#17161)
Problem:    Filetype detection for BASIC is not optimal.
Solution:   Improve BASIC filetype detection. (Doug Kearns)
6517f14165
2022-01-21 16:45:32 +01:00
Christian Clason
3906b2d4fc
vim-patch:fd31be29b822 (#17114)
Update runtime files
fd31be29b8
2022-01-17 11:58:36 +01:00
Christian Clason
70fe3ce004
vim-patch:8.2.4064: foam files are not detected (#17041)
* vim-patch:8.2.4064: foam files are not detected

Problem:    Foam files are not detected.
Solution:   Detect the foam filetype by the path and file contents. (Mohammed
            Elwardi Fadeli, closes vim/vim#9501)
2284f6cca3

* Port foam ft detection to filetype.lua

Co-authored-by: Gregory Anders <greg@gpanders.com>
2022-01-11 21:02:58 +01:00
Christian Clason
8c720f6b9d
vim-patch:partial fa3b72348d88 (#16780)
Update runtime files
fa3b72348d

omit
doc/eval.txt (needs 8.2.3864)
doc/map.txt (needs 8.2.3619)
menu.vim (needs 8.2.0413)
2021-12-26 11:03:25 +01:00
Christian Clason
ff1b0f632a
vim-patch:8.2.3843: dep3patch files are not recognized (#16700)
Problem:    Dep3patch files are not recognized.
Solution:   Recognize dep3patch files by their location and content. (James
            McCoy, closes vim/vim#9367)
647ab4cede
2021-12-18 17:22:09 +01:00
Christian Clason
0a3826646f
vim-patch:4700398e384f (#16538)
Update runtime files
4700398e38

partial skip:
doc/sign.txt
doc/various.txt
doc/motion.txt
2021-12-06 13:55:38 +01:00
zeertzjq
caf41a7ac9
vim-patch:8.2.3703: most people call F# "fsharp" and not "fs" (#16469)
Problem:    Most people call F# "fsharp" and not "fs".
Solution:   Rename filetype "fs" to "fsharp".
53ba95e4f0
2021-11-30 14:51:17 +01:00
Christian Clason
ea5699399e vim-patch:8.2.3686: filetype detection often mixes up Forth and F#
Problem:    Filetype detection often mixes up Forth and F#.
Solution:   Add a function to inspect the file contents. (Doug Kearns)
3d14c0f2b9
2021-11-27 19:21:57 +01:00
Christian Clason
afbf89dc01
vim-patch:8.2.3679: objc file detected as Octave (#16446)
Problem:    objc file detected as Octave. (Antony Lee)
Solution:   Detect objc by preprocessor lines. (Doug Kearns, closes vim/vim#9223,
            closes vim/vim#9220)
7329cfab36
2021-11-26 17:34:45 +01:00
Christian Clason
b9d57fa107
vim-patch:8.2.3432: octave/Matlab filetype detection does not work properly (#15652)
Problem:    Octave/Matlab filetype detection does not work properly.
Solution:   Update the patterns used for matching. (Doug Kearns)
ca0627df69
2021-09-13 10:00:09 +02:00
Christian Clason
aab3583e74
vim-patch:8.2.3399: Octave files are not recognized (#15622)
Problem:    Octave files are not recognized.
Solution:   Detect Octave files. (Doug Kearns)
deba5eb195
2021-09-10 14:01:13 +02:00
Jan Edmund Lazo
750ad18845
vim-patch:8.2.3050: cannot recognize elixir files
Problem:    Cannot recognize elixir files.
Solution:   Recognize Elixir-specific files.  Check if an .ex file is Euphoria
            or Elixir. (Austin Gatlin, closes vim/vim#8401, closes vim/vim#8446)
f3caeb63d6
2021-06-26 10:51:29 -04:00
Jan Edmund Lazo
1e03e76daf
vim-patch:207f009326c8
Update runtime files.
207f009326

Omit nl.po.
2021-04-29 21:56:34 -04:00
Jan Edmund Lazo
e612a0a76a
vim-patch:d1caa941d876
Update runtime files
d1caa941d8

Cherry-pick error E452 from patch v8.2.0486.
2021-04-27 22:40:39 -04:00
Jan Edmund Lazo
c8f07e5e1f
vim-patch:d7df279808f7
Update a few runtime files.
d7df279808
2021-04-27 09:21:33 -04:00
Jan Edmund Lazo
d953614e72
vim-patch:8.2.2334: Pascal-like filetypes not always detected
Problem:    Pascal-like filetypes not always detected.
Solution:   Improved Puppet, InstantFPC and Pascal detection. (Doug Kearns,
            closes vim/vim#7662)
a0122dcd1c
2021-01-13 18:25:00 -05:00
Jan Edmund Lazo
27a6728848
vim-patch:8.2.1476: filetype test fails on MS-Windows
Problem:    Filetype test fails on MS-Windows.
Solution:   Remove "^" from pattern.
aa9675a61d
2020-08-17 18:30:34 -04:00
Jan Edmund Lazo
97d3bd0bc6
vim-patch:8.2.1474: /usr/lib/udef/rules.d not recognized as udevrules
Problem:    /usr/lib/udef/rules.d not recognized as udevrules.
Solution:   Adjust match pattern. (Haochen Tong, closes 36722)
624b6eaf20
2020-08-17 18:30:10 -04:00
Justin M. Keyes
2cdbbe50a4 vim-patch:63b74a8362b1
Update runtime files.
63b74a8362
2019-08-01 22:48:28 +02:00
Justin M. Keyes
80dda68926 vim-patch:ba3ff539303c
Update runtime files
ba3ff53930
2019-07-29 20:50:07 +02:00
Jan Edmund Lazo
fb95bb38b5 vim-patch:8.1.0771: some shell filetype patterns end in a star
Problem:    Some shell filetype patterns end in a star.
Solution:   Make sure that patterns not ending in a star are preferred.
147e7d0cab
2019-03-17 20:38:55 -04:00
Jan Edmund Lazo
8394bf676b vim-patch:8.1.1017: off-by-one error in filetype detection
Problem:    Off-by-one error in filetype detection.
Solution:   Also check the last line of the file.
493fbe4abe
2019-03-17 20:35:03 -04:00
Justin M. Keyes
11bcd48fda vim-patch:20aac6c11269
Update runtime files.
20aac6c112
2018-10-29 23:55:45 +01:00