Age | Commit message (Collapse) | Author |
|
- update tags to detect djangohtml based on
https://docs.djangoproject.com/en/5.0/ref/templates/builtins/#built-in-tag-reference
- increase the lines to inspect to 40 lines
10 lines is too few and might result in high false negative.
Increasing it to 40 lines should reduce the false negative.
closes: #15037
Signed-off-by: Afiq Nazrie <afnazrie@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: Vim-script files may not be recognised
Solution: Add shebang line detection (Doug Kearns)
closes: #15012
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: hare runtime files outdated
Solution: runtime(hare): update hare.vim to match upstream
(Amelia Clarke)
closes: #14836
Signed-off-by: Amelia Clarke <selene@perilune.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: filetype: zsh module files are not recognized
Solution: Detect '*.mdh' and '*.epro' as C filetype, '*.mdd' as zsh
filetype, determine zsh-modules '*.pro' from from it's content
(Wu, Zhenyu)
closes: #14737
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: runtime(uci): No support for uci file types
(Wu, Zhenyu)
Solution: include basic uci ftplugin and syntax plugins
(Colin Caine)
closes: #14575
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Colin Caine <complaints@cmcaine.co.uk>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: filetype: some TeX files are not recognized
Solution: Add more patterns for TeX files and inspect
a few more files for being TeX files
(Wu, Zhenyu)
closes: #14456
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: Modula-2 files with a specified priority are not detected.
Solution: Match the priority syntax in module header lines when
performing heuristic content detection.
Disable the :defcompile debug line. This was accidentally left enabled
in commit 68a8947.
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
closes: #13966
Signed-off-by: Andrew Radev <andrey.radev@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
fixes: #13847
Co-authored-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: Modula2 filetype support lacking
Solution: Improve the Modula-2 runtime support, add additional modula2
dialects, add compiler plugin, update syntax highlighting,
include syntax tests, update Makefiles (Doug Kearns)
closes: #6796
closes: #8115
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Benjamin Kowarsch <trijezdci@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Patch provided by Dan Alt
closes: #13793
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: no filetype detection for execline scripts
Solution: Add filetype detection for execline
as a prior to adding syntax support for execline (see
https://github.com/djpohly/vim-execline/issues/2), i went ahead and made
the filetype detection for execline scripts.
closes: #13689
Signed-Off-By: Mazunki Hoksaas <rolferen@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
related: #11426
Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Add syntax and filetype plugins for SWIG (Simplified Wrapper Interface
Generator) description files.
The default syntax for .i files highlights comments in a reverse
color scheme which doesn't look well. This syntax builds
on vim's c++ syntax by adding highlighting for common swig
directives and user defined directives. For an alternative
syntax, see vimscript #1247 (which I found after writing this).
closes: #13562
Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
Co-authored-by: Julien Marrec <julien.marrec@gmail.com>
Signed-off-by: Julien Marrec <julien.marrec@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
support (#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.
Signed-off-by: Sean Dewar <seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Also, enable the zip and gzip plugins by default, unless those variables
were not explicitly set by the user.
related: #13413
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
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.
Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Strace output, depending on parameters (-ttf this time), can dump both
times and pid:
1038 07:14:20.959262 execve("./e.py", ["./e.py"], 0x7ffca1422840 /* 51 vars */) = 0 <0.000150>
So loose the regexp matching this, so that the above is matched too.
Fixes #13481.
Co-authored-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: Not all Dart files detected
Solution: Add shebang filetype detection for Dart
closes: #13449
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: Janet files are not recognised
Solution: Add filename and shebang detection (without
adding an extra filetype plugin)
Those are used by the Janet language:
http://www.janet-lang.org
closes: #13400
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
|
Fix the issue introduced by #12557. `:substitute` commands in plugins
need to take into account whether `gdefault` is set or not because
that depends on the user.
closes: #13097
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: Rexx files may not be recognised
Solution: Add shebang detection and improve disambiguation of *.cls
files
closes: #12951
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
|
Problem: runtime: crystal scripts not recognised
Solution: Filetype detect Crystal scripts by shebang line
closes: #12935
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
|
Problem: Vimball/Visual Basic filetype detection conflict
Solution: runtime(vb): Improve Vimball and Visual Basic detection logic
Only run Vimball Archiver's BufEnter autocommand on Vimball archives.
Fixes #2694.
closes: #12899
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
|
Problem: cannot distinguish Forth and Fortran *.f files
Solution: Add Filetype detection Code
Also add *.4th as a Forth filetype
closes: #12251
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
|
Closes: vim/vim#12301
Co-authored-by: Jason Franklin <jason@oneway.dev>
|
|
Manual pages requested for output may undergo formatting
arranged by some roff-descendant program. Lines longer
than MANWIDTH or COLUMNS or real-estate width of a device
(with support for horizontal scrolling considered) can be
divided at either blank characters and/or at groups of word
characters (syllables) according to supported hyphenation
rules (although page authors are free to disable hyphenation
or prevent particular words from being hyphenated).
Groff‘s manual describes it as follows:
5.1.2 Hyphenation
Since the odds are not great for finding a set of words, for
every output line, which fit nicely on a line without
inserting excessive amounts of space between words, gtroff
hyphenates words so that it can justify lines without
inserting too much space between words. It uses an internal
hyphenation algorithm (a simplified version of the algorithm
used within TeX) to indicate which words can be hyphenated
and how to do so. When a word is hyphenated, the first part
of the word is added to the current filled line being output
(with an attached hyphen), and the other portion is added to
the next line to be filled.
It would be expedient for autoload/dist/man.vim (along with
syntax/man.vim‘s highlighting and ftplugin/man.vim‘s Ctrl-],
\K mappings) to allow for hyphenation of cross-references
to manual pages.
For example,
# Launch Vim [v9.0; patched: 1-1378, 1499] as follows:
MANWIDTH=80 vim --not-a-term +MANPAGER '+Man man' '+/conv(1)' '+norm B'
# Press Ctrl-] with cursor on _m_: "... use man‐
# conv(1) directly."_______________________[^]
#
# (Man v2.11.2)
# Launch Vim as follows:
MANWIDTH=80 vim --not-a-term +MANPAGER '+Man git' '+/config(1)' '+norm B'
# Press Ctrl-] with cursor on _g_: "... in git-
# config(1) for a more ..."_______________[^]
#
# (Git v2.39.2)
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
|
|
Functions col and cursor count each tab (0x9) as a byte, and
are complementary. On the other hand, the | command motion
takes into consideration how many screen columns a tab does
occupy and may move cursor to a column closer to the start
of line than col would report at that position.
The provided changes prefer the cursor function to the | command.
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
|
|
* Dedicate upcoming Vim 9.1 to Bram
Also replace in a few more places Brams email address and mention new
maintainers.
* Remove Bram from any Maintainer role
* runtime: Align Header
* it's mailing list not mailinglist
|
|
This is a collection of various PRs from github that all require a minor
patch number:
1) https://github.com/vim/vim/pull/12612
Do not conflate dictionary key with end of block
2) https://github.com/vim/vim/pull/12729:
When saving and restoring 'undolevels', the constructs `&undolevels` and
`:set undolevels` are problematic.
The construct `&undolevels` reads an unpredictable value; it will be the
local option value (if one has been set), or the global option value
(otherwise), making it unsuitable for saving a value for later
restoration.
Similarly, if a local option value has been set for 'undolevels',
temporarily modifying the option via `:set undolevels` changes the local
value as well as the global value, requiring extra work to restore both
values.
Saving and restoring the option value in one step via the construct
`:let &undolevels = &undolevels` appears to make no changes to the
'undolevels' option, but if a local option has been set to a different
value than the global option, it has the unintended effect of changing
the global 'undolevels' value to the local value.
Update the documentation to explain these issues and recommend explicit
use of global and local option values when saving and restoring. Update
some unit tests to use `g:undolevels`.
3) https://github.com/vim/vim/pull/12702:
Problem: Pip requirements files are not recognized.
Solution: Add a pattern to match pip requirements files.
4) https://github.com/vim/vim/pull/12688:
Add indent file and tests for ABB Rapid
5) https://github.com/vim/vim/pull/12668:
Use Lua 5.1 numeric escapes in tests and add to CI
Only Lua 5.2+ and LuaJIT understand hexadecimal escapes in strings. Lua
5.1 only supports decimal escapes:
> A character in a string can also be specified by its numerical value
> using the escape sequence \ddd, where ddd is a sequence of up to three
> decimal digits. (Note that if a numerical escape is to be followed by a
> digit, it must be expressed using exactly three digits.) Strings in Lua
> can contain any 8-bit value, including embedded zeros, which can be
> specified as '\0'.
To make sure this works with Lua 5.4 and Lua 5.1 change the Vim CI to
run with Lua 5.1 as well as Lua 5.4
6) https://github.com/vim/vim/pull/12631:
Add hurl filetype detection
7) https://github.com/vim/vim/pull/12573:
Problem: Files for haskell persistent library are not recognized
Solution: Add pattern persistentmodels for haskell persistent library
closes: #12612
closes: #12729
closes: #12702
closes: #12688
closes: #12668
closes: #12631
closes: #12573
Co-authored-by: lacygoill <lacygoill@lacygoill.me>
Co-authored-by: Michael Henry <drmikehenry@drmikehenry.com>
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de>
Co-authored-by: James McCoy <jamessan@jamessan.com>
Co-authored-by: Jacob Pfeifer <jacob@pfeifer.dev>
Co-authored-by: Borys Lykah <lykahb@fastmail.com>
|
|
Problem: The program to filetype translation is not exported.
Solution: Export Exe2filetype().
|
|
Problem: Nix files are not recognized from the hashbang line.
Solution: Add a hashbang check. (issue #12507)
|
|
Problem: Some "gomod" files are not recognized.
Solution: Check for "go.mod" file name before checking out the contents.
(Omar El Halabi, closes #12462)
|
|
|
|
Problem: Typst filetype is not recognized.
Solution: Distinguish between sql and typst. (Gaetan Lepage, closes #12363)
|
|
Problem: Global 'filetype' is set when it is detected from the file content.
Solution: Set the local 'filetype' option value.
|
|
|
|
Problem: Filetypes for *.v files not detected properly.
Solution: Use the file contents to detect the filetype. (Turiiya,
closes #12281)
|
|
Problem: Strace filetype detection is expensive.
Solution: Match with a cheap pattern first. (Federico Mengozzi,
closes #12220)
|
|
Problem: .fs files are falsely recognized as forth files.
Solution: Check 100 lines for something that looks like forth. (Johan
Kotlinski, closes #12219, closes #11988)
|
|
|
|
|
|
|
|
|
|
Problem: Conflict between supercollider and scala filetype detection.
Solution: Do not check for "Class : Method", it can appear in both
filetypes. (Chris Kipp, closes #11699)
|
|
|
|
Problem: When using dash it may not be recognize as filetype "sh".
Solution: Add checks for "dash". (Eisuke Kawashima,closes #11600)
|
|
Problem: lsl and lm3 file extensions are not recognized.
Solution: Add *.lsl and *.lm3 patterns. (Doug Kearns, closes #11384)
|
|
|