diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-16 15:29:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-16 15:29:36 +0800 |
commit | da13ed43cb3593f6d50e08fc6e5f26760da63f84 (patch) | |
tree | e210a95266c01861b206479bcda6e3835d2ca4c7 /runtime | |
parent | cf3b871fa940c42e9c94257118f7d1131ebd362a (diff) | |
download | rneovim-da13ed43cb3593f6d50e08fc6e5f26760da63f84.tar.gz rneovim-da13ed43cb3593f6d50e08fc6e5f26760da63f84.tar.bz2 rneovim-da13ed43cb3593f6d50e08fc6e5f26760da63f84.zip |
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)
https://github.com/vim/vim/commit/73a024209cbfbd5b39a2e974084d807c6131e2ed
Use latest index.txt :argdedupe doc from Vim.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/editing.txt | 11 | ||||
-rw-r--r-- | runtime/doc/index.txt | 1 |
2 files changed, 10 insertions, 2 deletions
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index c19d9f482b..dcb0bf8a2e 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -613,12 +613,19 @@ list of the current window. And after the last one: :+2argadd y a b c x y There is no check for duplicates, it is possible to - add a file to the argument list twice. - The currently edited file is not changed. + add a file to the argument list twice. You can use + |:argdedupe| to fix it afterwards: > + :argadd *.txt | argdedupe +< The currently edited file is not changed. Note: you can also use this method: > :args ## x < This will add the "x" item and sort the new list. +:argded[upe] *:argded* *:argdedupe* + Remove duplicate filenames from the argument list. + If your current file is a duplicate, your current file + will change to the original file index. + :argd[elete] {pattern} .. *:argd* *:argdelete* *E480* *E610* Delete files from the argument list that match the {pattern}s. {pattern} is used like a file pattern, diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 7d8a89887a..7f3ef20762 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1143,6 +1143,7 @@ tag command action ~ be remapped |:args| :ar[gs] print the argument list |:argadd| :arga[dd] add items to the argument list +|:argdedupe| :argded[upe] remove duplicates from the argument list |:argdelete| :argd[elete] delete items from the argument list |:argedit| :arge[dit] add item to the argument list and edit it |:argdo| :argdo do a command on all items in the argument list |