Age | Commit message (Collapse) | Author |
|
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>
|
|
Refactored zig ftplugin, removed upstream comment, aucmd and
auto formatting support. Updated documentation for zig configuration
settings and added new maintainer.
closes: #13803
Signed-off-by: Tiseno <mathias.lindgren@stabelo.se>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
regression introduced in ce2ad9ffd79fe6b2307cd46b9
The current logic is a bit funny, in that it checks for an executable of
scp, then pscp and if neither exists, it uses: scp :/
Anyway, let's fall back to the logic used before the above commit.
related: #14739
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
command
closes: #14742
Signed-off-by: Nir Lichtman <nir@lichtman.org>
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>
|
|
closes: #14739
Signed-off-by: Nir Lichtman <nir@lichtman.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
closes: #14732
Signed-off-by: Nir Lichtman <nir@lichtman.org>
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>
|
|
fixes: #14400
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Fix typo in netrw#NetWrite (http) error message call.
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Update Last-Change Header for netrw and doc/indent.txt, fix a trailing
whitespace in indent.txt and make CI happy.
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
fixes: #2386
related: #3609
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>
|
|
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>
|
|
Make pattern, which retrieves the path component from e.g.
`scp://user@host//opt/program/file.ext` non-greedy.
Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
(#12180)
fixes: #12143
Signed-off-by: user202729 <25191436+user202729@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Originally reported at: https://github.com/vim-jp/issues/issues/1428
'isk' was unintentionally changed by netrw, regression
introduced in Commit: 71badf9547e8f89571b9a095183671cbb333d528
Signed-off-by: Ken Takata <kentkt@csc.jp>
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>
|
|
Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Use `printf("%c")` instead of `nr2char()` to handle '%xx' as a byte.
Close #13787
Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
* Import netrw v174b
* Revert unwanted changes
* Fix indent
* Revert some changes
* Update tags
* Break long line
Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
From: #138331:
- Updating .tar.zst files was broken. Fixes #12639.
- Extracting files from .tar.zst / .tzs files was also broken and
works now.
From: #12637:
- Fixes variable assignment and typo
From: #8109:
- Rename .tzs to the more standard .tzst
fixes: #12639
fixes: #8105
closes: #8109
closes: #12637
closes: #13831
Co-authored-by: Martin Rys <martin@rys.pw>
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Co-authored-by: Carlo Teubner <carlo@cteubner.net>
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>
|
|
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Update to the ConTeXt runtime files. Changes:
1. shared syntax files updated with `mtxrun --script interface --vim`
using the latest ConTeXt LMTX.
2. fixed reference to `make` tag in the help file.
3. added `keepend` to mitigate issues with embedded Lua syntax (see
below).
4. the latest revision date of each ConTeXt runtime file has been
updated to the date of this commit.
The issue about embedded Lua was reported by a user:
>Take the following valid ConTeXt file:
> \starttext
> \ctxlua{context("Text generated from Lua.")}
> \ctxlua{context("Another text generated from Lua.")}
> \stoptext
>On my Vim installation (including when I start Vim with `--clean`), the
>closing bracket and curly braces on line 2 are highlighted red and the
>syntax highlighting after that is off.
>I was trying to dig a little bit into what was going on, using the
>`synID()` and `synIDattr()` functions. It appears that the closing
>bracket on line 2 is matched as a `luaParentError` instead of the end
>of the `luaParen` region. Therefore, the `luaParen` region continues
>all the way to the end of the file. The closing curly brace on line
>2 is matched as a `luaError`, the 2nd `\ctxlua` on line 3 as
>`luaParen`, etc.
>This issue doesn't occur in a plain Lua file, where the closing bracket
>is correctly matched as the end of the `luaParen` region. So it seems
>that something goes wrong when the Lua syntax file is included in the
>ConTeXt one.
By adding `keepend`, the right parenthesis for some reason is still
highlighted as a `luaParenError`, but at least the right curly brace
should correctly end the Lua block.
From what I've seen, I think it is very difficult to embed Lua syntax
properly without help from the Lua syntax file (that is, without
patching it). It has global rules such as:
syn match luaParenError ")"
syn match luaError "}"
which make it difficult, if not impossible, to contain Lua syntax
without `keepend` (and its limitations).
Signed-off-by: Lifepillar <lifepillar@lifepillar.me>
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: Christian Brabandt <cb@256bit.org>
|
|
This brings the included Racket runtime files to commit 43bfc87 (update
headers, 2023-12-15) of https://github.com/benknoble/vim-racket. Note
that not all files from that repository are included. (In particular,
the ftdetect script is omitted for now.)
Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
fixes #13678
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
(#13659)
* NetRW: Fix `w:netrw_bannercnt` ref error with `netrw_fastbrowse=2`
* NetRW: Fix wrong `w:netrw_bannercnt` setting
closes: #13640
Signed-off-by: yasuda <yasuda@kyoto-sr.co.jp>
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>
|
|
If there is a file with a very long filename (longer than
g:netrw_maxfilenamelen), and if g:netrw_liststyle is set to 1, no space
is inserted between the filename and the filesize and the file cannot be
opened because of this.
E.g.:
```
$ echo hello > 12345678901234567890123456789012 # 32 bytes: OK
$ echo hello > 123456789012345678901234567890123 # 33 bytes: not OK
$ echo hello > 1234567890123456789012345678901234 # 34 bytes: not OK
$ echo hello > こんにちは # multibyte filename
$ LC_ALL=C.UTF-8 vim . --clean --cmd "set loadplugins" --cmd "let g:netrw_liststyle=1"
```
Then, it will be shown like this:
```
" ============================================================================
" Netrw Directory Listing (netrw v171)
" /cygdrive/c/work/netrw-test
" Sorted by name
" Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\
" Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:special
" ==============================================================================
../ 0 Mon Mar 13 19:25:16 2023
./ 0 Mon Mar 13 19:44:58 2023
12345678901234567890123456789012 6 Mon Mar 13 19:29:43 2023
12345678901234567890123456789012346 Mon Mar 13 19:32:40 2023
1234567890123456789012345678901236 Mon Mar 13 19:29:49 2023
こんにちは 6 Mon Mar 13 19:30:41 2023
```
If the length of the filename is 32 bytes, there is a space between the
filename and the filesize. However, when it is longer than 32 bytes, no
space is shown.
Also, you may find that the filesize of the multibyte named file is not
aligned.
After this patch is applied, the filelist will be shown like this:
```
" ============================================================================
" Netrw Directory Listing (netrw v171)
" /cygdrive/c/work/netrw-test
" Sorted by name
" Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\
" Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:special
" ==============================================================================
../ 0 Mon Mar 13 20:49:22 2023
./ 0 Mon Mar 13 21:12:14 2023
1234567890123456789012345678901 10000 Mon Mar 13 20:57:55 2023
12345678901234567890123456789012 6 Mon Mar 13 19:29:43 2023
123456789012345678901234567890123 6 Mon Mar 13 19:29:49 2023
1234567890123456789012345678901234 6 Mon Mar 13 19:32:40 2023
1234567890123456789012345678901234567 10000 Mon Mar 13 21:03:23 2023
1234567890123456789012345678901234567890 10000 Mon Mar 13 21:03:36 2023
123456789012345678901234567890123456789012 10000 Mon Mar 13 21:03:59 2023
1234567890123456789012345678901234567890123 10000 Mon Mar 13 21:03:45 2023
1234567890123456789012345678901234567890123456 5 Mon Mar 13 21:08:15 2023
12345678901234567890123456789012345678901234567 10 Mon Mar 13 21:05:21 2023
こんにちは 6 Mon Mar 13 19:30:41 2023
```
Now we have 32 + 2 + 15 = 49 characters for filename and filesize.
It tries to align the filesize as much as possible.
The last line that has multibyte filename is also aligned.
Also fixed the issue that the file list is not shown correctly when
g:netrw_sort_by is set to 'size' and g:netrw_sizestyle is set to 'h' or
'H'.
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
When expanding $COMSPEC and a user has set :set wildignore=*.exe
netrw won't be able to properly cmd.exe, because it does not ignore the
wildignore setting.
So let's explicitly use expand() without applying the 'wildignore' and
'suffixes' settings to the result
closes: #13426
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Do not rely on the fact, that the last line matches warning, error,
inappropriate or unrecognized to determine if an error occurred. It
could also be a file, contains such a keyword.
So make the error detection slightly more strict and only assume an
error occured, if in addition to those 4 keywords, also a space matches
(this assumes the error message contains a space), which luckily on Unix
not many files match by default.
The whole if condition seems however slightly dubious. In case an error
happened, this would probably already be caught in the previous if
statement, since this checks for the return code of the tar program.
There may however be tar implementations, that do not set the exit code
for some kind of error (but print an error message)? But let's keep this
check for now, not many people have noticed this behaviour until now, so
it seems to work reasonably well anyhow.
related: #6425
fixes: #13489
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>
|
|
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 more typos
* Fix typos in ignored runtime/ directory
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
closes: #11359
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
closes: #9738
Signed-off-by: Christian Brabandt <cb@256bit.org>
|