Commit Graph

102 Commits

Author SHA1 Message Date
Christian Clason
7ed6966023 vim-patch:93197fde0f1d
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"

Problem:  The "*.*" browsefilter pattern only matches all files on
	  Windows (Daryl Lee)
Solution: Use "*" to filter on all platforms but keep "*.*" as the label
	  text on Windows. (Fixes vim/vim#12685, Doug Kearns)

The *.* browsefilter pattern used to match "All Files" on Windows is a
legacy of the DOS 8.3 filename wildcard matching algorithm.  For reasons
of backward compatibility this still works on Windows to match all
files, even those without an extension.

However, this pattern only matches filenames containing a dot on other
platforms.  This often makes files without an extension difficult to
access from the file dialog, e.g., "Makefile"

On Windows it is still standard practice to use "*.*" for the filter
label so ftplugins should use "All Files (*.*)" on Windows and "All
Files (*)" on other platforms.  This matches Vim's default browsefilter
values.

This commit also normalises the browsefilter conditional test to check
for the Win32 and GTK GUI features and an unset b:browsefilter.

closes: vim/vim#12759

93197fde0f

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2024-01-15 11:40:44 +01:00
Justin M. Keyes
29fe883aa9
feat: ignore swapfile for running Nvim processes #25336
Problem:
The swapfile "E325: ATTENTION" dialog is displayed when editing a file
already open in another (running) Nvim. Usually this behavior is
annoying and irrelevant:
- "Recover" and the other options ("Open readonly", "Quit", "Abort") are
  almost never wanted.
- swapfiles are less relevant for "multi-Nvim" since 'autoread' is
  enabled by default.
  - Even less relevant if user enables 'autowrite'.

Solution:
Define a default SwapExists handler which does the following:
1. If the swapfile is owned by a running Nvim process, automatically
   chooses "(E)dit anyway" (caveat: this creates a new, extra swapfile,
   which is mostly harmless and ignored except by `:recover` or `nvim -r`.
2. Shows a 1-line "ignoring swapfile..." message.
3. Users can disable the default SwapExists handler via `autocmd! nvim_swapfile`.
2023-10-04 06:31:25 -07:00
zeertzjq
08aea256c8
vim-patch:2dfc22908e43 (#25485)
runtime(doc): remove E1507 help tag, which is no longer used (vim/vim#13254)

2dfc22908e
2023-10-03 14:32:47 +08:00
zeertzjq
1101cfeb34
vim-patch:9.0.1972: win32: missing '**' expansion test (#25476)
Problem:  win32: missing '**' expansion test (after v9.0.1947)
Solution: Add test for MS-Windows

win32: Add "**" test

Vim supports "**" on MS-Windows. However, it is not tested by
`Test_glob_extended_bash`.

Unlike Unix, it doesn't use 'shell' and doesn't support {,} expansion.
So, I added as a separate test.

related: vim/vim#13205
closes: vim/vim#13250

4a1ad55564

Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-03 07:24:54 +08:00
zeertzjq
f6e72c3dfe vim-patch:9.0.1962: No support for writing extended attributes
Problem:  No support for writing extended attributes
Solution: Add extended attribute support for linux

It's been a long standing issue, that if you write a file with extended
attributes and backupcopy is set to no, the file will loose the extended
attributes.

So this patch adds support for retrieving the extended attributes and
copying it to the new file. It currently only works on linux, mainly
because I don't know the different APIs for other systems (BSD, MacOSX and
Solaris).  On linux, this should be supported since Kernel 2.4 or
something, so this should be pretty safe to use now.

Enable the extended attribute support with normal builds.

I also added it explicitly to the :version output as well as make it
able to check using `:echo has("xattr")`, to have users easily check
that this is available.

In contrast to the similar support for SELINUX and SMACK support (which
also internally uses extended attributes), I have made this a FEAT_XATTR
define, instead of the similar HAVE_XATTR.

Add a test and change CI to include relevant packages so that CI can
test that extended attributes are correctly written.

closes: vim/vim#306
closes: vim/vim#13203

e085dfda5d

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-09-30 22:09:55 +08:00
zeertzjq
92e40f8d18 vim-patch:9.0.1946: filename expansion using ** in bash may fail
Problem:  filename expansion using ** in bash may fail
Solution: Try to enable the globstar setting

Starting with bash 4.0 it supports extended globbing using the globstar
shell option. This makes matching recursively below a certain directory
using the ** pattern work as expected nowadays.  However, we need to
explicitly enable this using the 'shopt -s globstar' bash command.

So let's check the bash environment variable $BASH_VERSINFO (which is
supported since bash 3.0 and conditionally enable the globstar option,
if the major version is at least 4. For older bashs, this at least
shouldn't cause errors (unless one is using really ancient bash 2.X or
something).

closes: vim/vim#13002
closes: vim/vim#13144

9eb1ce5315

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-09-29 06:07:27 +08:00
bfredl
c3d1d9445c refactor(options)!: graduate some more shortmess flags
A lot of updated places in the docs were already incorrect since long
since they did not reflect the default behaviour.

"[dos format]" could've been argued being better for discoverability
but that ship has already sailed as it is no longer displayed by default.
2023-09-25 18:23:15 +02:00
Gregory Anders
fdcb74fc4b docs: remove more references to shm-f 2023-09-24 19:40:00 -05:00
Justin M. Keyes
036da0d079 fix(docs): vimdoc syntax errors
gen_help_html: truncate parse-error sample text
2023-06-25 17:14:28 +02:00
Justin M. Keyes
cee981bf09
docs #22363
Co-authored by: zeertzjq <zeertzjq@outlook.com>
Co-authored by: Steven Todd McIntyre II <114119064+stmii@users.noreply.github.com>
Co-authored by: nobe4 <nobe4@users.noreply.github.com>

- docs: mention --luadev-mod to run with lua runtime files
  When changing a lua file in the ./runtime folder, a new contributor
  might expect changes to be applied to the built Neovim binary.
2023-06-19 02:24:44 -07:00
dundargoc
08991b0782
docs: small fixes
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: HiPhish <hiphish@posteo.de>
Co-authored-by: Julio B <julio.bacel@gmail.com>
Co-authored-by: T727 <74924917+T-727@users.noreply.github.com>
Co-authored-by: camoz <camoz@users.noreply.github.com>
Co-authored-by: champignoom <66909116+champignoom@users.noreply.github.com>
2023-05-13 21:33:22 +02:00
Justin M. Keyes
6752f1005d docs: naming conventions, guidelines
close #21063
2023-02-22 16:23:49 +01:00
Christian Clason
18c22a6fb4 docs: fix treesitter parsing errors 2023-01-01 15:05:13 +01:00
Justin M. Keyes
1c324cb192
docs #20986
- https://github.com/neovim/tree-sitter-vimdoc v1.2.4 eliminates most
  errors in pi_netrw.txt, so we can remove that workaround from
  ignore_parse_error().
- improved codeblock
2022-12-11 18:41:26 -08:00
zeertzjq
707df88054
docs: add missing docs from some Vim patches (#21296)
This is cherry-picked from these Vim patches:

Only applicable change outside vi_diff.txt in patch 8.1.1226:
6c60f47fb9

Most changes outside starting.txt and vi_diff.txt in patch 8.1.1280:
25c9c680ec

Missing docs for 'mousemoveevent':
cbaff5e06e
2022-12-05 21:09:31 +08:00
dundargoc
615f124003
docs: fix typos (#21196)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Raphael <glephunter@gmail.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
2022-11-29 09:45:48 +08:00
Jlll1
f004812b33
feat(secure): add :trust command and vim.secure.trust() (#21107)
Introduce vim.secure.trust() to programmatically manage the trust
database. Use this function in a new :trust ex command which can
be used as a simple frontend.

Resolves: https://github.com/neovim/neovim/issues/21092
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: ii14 <ii14@users.noreply.github.com>
2022-11-28 12:23:04 -07:00
Victor Blanchard
d337814906
feat: ":write ++p" creates parent dirs #20835
- `:write ++p foo/bar/baz.txt` should create parent directories `foo/bar/` if
   they do not exist
    - Note: `:foo ++…` is usually for options. No existing options have
      a single-char abbreviation (presumably by design), so it's safe to
      special-case `++p` here.
- Same for `writefile(…, 'foo/bar/baz.txt', 'p')`
- `BufWriteCmd` can see the ++p flag via `v:cmdarg`.

closes #19884
2022-11-06 19:31:50 -08:00
zeertzjq
41f308feab
vim-patch:9.0.0826: if 'endofline' is set CTRL-Z may be written in a wrong place (#20903)
Problem:    If 'endofline' is set the CTRL-Z may be written in the wrong
            place.
Solution:   Write CTRL-Z at the end of the file.  Update the help to explain
            the possibilities better. (Ken Takata, closes vim/vim#11486)

3af982196b

Co-authored-by: K.Takata <kentkt@csc.jp>
2022-11-02 08:02:52 +08:00
Louis Sven Goulet
2a3cb0893b
feat: ":write!" skips "file changed" warning #18665
Problem:
Cannot opt-out of "WARNING: The file has been changed since reading
it!!!", even with ":write!".

Solution:
Change ":write!" to skip the warning.

closes #7270
2022-09-24 18:57:10 -07:00
zeertzjq
da13ed43cb
vim-patch:8.2.3888: the argument list may contain duplicates (#19795)
Problem:    The argument list may contain duplicates.
Solution:   Add the :argdedeupe command. (Nir Lichtman, closes vim/vim#6235)
73a024209c

Use latest index.txt :argdedupe doc from Vim.
2022-08-16 15:29:36 +08:00
Christian Clason
f3c8f3e5d4
vim-patch:partial:8a3b805c6c9c (#19104)
Update runtime files
8a3b805c6c

skip builtin.txt (needs 8.2.4838)
skip message.txt (whitespace changes)
2022-06-27 10:23:09 +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
zeertzjq
d4982e152c
vim-patch:partial:a2baa73d1d33 (#17675)
Update runtime files.
a2baa73d1d

Cherry-pick tabpage.txt changes from patch 8.2.1413.
Skip digraph functions: included in #17440.
Skip many error codes as they haven't been ported yet.
2022-03-12 06:52:54 +08:00
Christian Clason
9d3370a144
vim-patch:c51cf0329809 (#17530)
Update runtime files.
c51cf03298
2022-02-27 11:56:30 +01:00
Sean Dewar
c07b5b5de6
vim-patch:partial 944697ae196 (#17493)
Update runtime files
944697ae19

Doc changes:

Include remote_*() (even though +clientserver and remote.txt isn't ported yet)
Omit screenpos() (need v8.2.4389)
Other changes are N/A or cannot be directly applied
2022-02-23 12:22:18 +00:00
zeertzjq
5220891571 vim-patch:8.2.4343: when reloading not all properties are detected
Problem:    When reloading not all properties are detected.
Solution:   Add the "edit" value to v:fcs_choice. (Rob Pilling, closes vim/vim#9579)
8196e94a8b

Cherry-pick some test changes from patch 8.1.1826.
2022-02-14 11:35:25 +08:00
zeertzjq
7d72076a6f vim-patch:8.2.3219: :find searches non-existing directories
Problem:    :find searches non-existing directories.
Solution:   Check the path is not "..".  Update help. (Christian Brabandt,
            closes vim/vim#8612, closes vim/vim#8533)
7a4ca32175

Change STRNCAT to STRLCAT as clint doesn't like the former.

Include a typo fix from 2f0936cb9a (diff-7e9292cae1f2ba70dd5b17d2d162693a91044ada6ac99e9c3e8917f32878c097)
2022-02-01 17:08:40 +08:00
Christian Clason
4ba7fa1700
vim-patch:6f4754b9f725 (#17179)
Update runtime files
6f4754b9f7
2022-01-23 18:38:41 +01:00
Christian Clason
3906b2d4fc
vim-patch:fd31be29b822 (#17114)
Update runtime files
fd31be29b8
2022-01-17 11:58:36 +01:00
zeertzjq
42cf76fd0a vim-patch:8.2.3780: ":cd" works differently on MS-Windows
Problem:    ":cd" works differently on MS-Windows.
Solution:   Add the 'cdhome' option. (closes vim/vim#9324)
29f3a45915
2021-12-25 11:31:54 +08:00
zeertzjq
bdd180b5d2
docs: clarify chdir/CWD behaviors #16083 2021-10-19 07:37:11 -07:00
zeertzjq
34cfe74568 vim-patch:8.2.0876: :pwd does not give a hint about the scope of the directory
Problem:    :pwd does not give a hint about the scope of the directory
Solution:   Make ":verbose pwd" show the scope. (Takuya Fujiwara, closes vim/vim#5469)
950587242c
2021-10-17 22:04:53 +08:00
zeertzjq
8727d38012 vim-patch:8.1.1291: not easy to change directory and restore
Problem:    Not easy to change directory and restore.
Solution:   Add the chdir() function. (Yegappan Lakshmanan, closes vim/vim#4358)
1063f3d200

Also includes some documentation changes from patch 8.1.1218.
2021-10-17 22:04:53 +08:00
Christian Clason
0ba77f2f31 vim-patch:2286304cdbba
Update runtime files
2286304cdb
2021-10-16 18:03:51 +02:00
Christian Clason
0c2a7aa5f7
vim-patch:6e649224926b (#15911)
Update runtime files
6e64922492
2021-10-05 14:12:16 +02:00
Jan Edmund Lazo
abb13dde98
vim-patch:130cbfc31235
Update runtime files
130cbfc312
2021-05-02 12:03:34 -04:00
Jan Edmund Lazo
dd2bc06411
vim-patch:82be4849eed0
Update runtime files.
82be4849ee
2021-05-01 23:19:57 -04:00
Jan Edmund Lazo
b1cd67b62e
vim-patch:4072ba571bab
Update runtime files.
4072ba571b

Omit vim9 references.
Omit assert_fails(). Patch v8.2.1183 is not ported yet.
2021-05-01 22:29:03 -04:00
Jan Edmund Lazo
330500a5bf
vim-patch:cb80aa2d53e5
Update runtime files.
cb80aa2d53

Omit runtime/doc/tabpage.txt.
Patch v8.2.1401 is not ported yet.

Port optwin.vim changes without gettext().
Patch v8.2.1544 is not ported yet.
2021-05-01 22:29:02 -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
27fb03f5a0
vim-patch:7ff78465f705
Update runtime files
7ff78465f7
2021-04-28 23:04:14 -04:00
Jan Edmund Lazo
0185625c04
vim-patch:47e13953ffdb
Update runtime files
47e13953ff

Ignore *.rej files, generated by vim-patch.sh.
Source of mistakes for 1st-time contributors.
2021-04-28 21:29:57 -04:00
Jan Edmund Lazo
ae362c2120
vim-patch:5666fcd0bd79
Update runtime files.
5666fcd0bd

Do not manually port E290 error message.
Neovim has E5030,E5031 error messages to replace E290.
2021-04-27 09:21:33 -04:00
Jan Edmund Lazo
b1fed1ada9
vim-patch:5be4ceecea55
Update runtime files.
5be4ceecea
2021-04-27 09:21:27 -04:00
Volodymyr Kot
df4440024b
vim-patch:30e9b3c42567 (#13936)
Update runtime files
30e9b3c425
2021-03-03 18:19:01 -05:00
Austin Traver
ef8f965c64
doc: Add optional d for :lcd and :tcd (#12359)
The `:lcd -` command, and `:tcd -` which returns to a previous directory, can be done with `:lc -` and `:tc -` respectively. 

Basically, the d is optional, so I updated the documentation to indicate this in the traditional format.
2020-05-22 21:35:40 -04:00
Justin M. Keyes
bd23fefb39 vim-patch:12ee7ff00b91
Update runtime files
12ee7ff00b
2019-08-02 16:20:22 +02:00
Justin M. Keyes
0414a33868 vim-patch:61da1bfa6c6b
Update runtime files.
61da1bfa6c
2019-08-02 16:20:22 +02:00
Justin M. Keyes
ce76dffda4 doc: rewrite *feature-list* 2019-04-08 03:42:21 +02:00