Mercurial > vim
comparison runtime/doc/editing.txt @ 26719:2bdcce61a4e4 v8.2.3888
patch 8.2.3888: the argument list may contain duplicates
Commit: https://github.com/vim/vim/commit/73a024209cbfbd5b39a2e974084d807c6131e2ed
Author: Nir Lichtman <nir_lichtman@hotmail.com>
Date: Fri Dec 24 20:28:03 2021 +0000
patch 8.2.3888: the argument list may contain duplicates
Problem: The argument list may contain duplicates.
Solution: Add the :argdedeupe command. (Nir Lichtman, closes https://github.com/vim/vim/issues/6235)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 24 Dec 2021 21:30:03 +0100 |
parents | 3a63b1e4a6f4 |
children | edb7d53fc7e3 |
comparison
equal
deleted
inserted
replaced
26718:8c929924dc15 | 26719:2bdcce61a4e4 |
---|---|
648 :1argadd x a x b c | 648 :1argadd x a x b c |
649 :$argadd x a b c x | 649 :$argadd x a b c x |
650 And after the last one: | 650 And after the last one: |
651 :+2argadd y a b c x y | 651 :+2argadd y a b c x y |
652 There is no check for duplicates, it is possible to | 652 There is no check for duplicates, it is possible to |
653 add a file to the argument list twice. | 653 add a file to the argument list twice. You can use |
654 The currently edited file is not changed. | 654 |:argdedupe| to fix it afterwards: > |
655 :argadd *.txt | argdedupe | |
656 < The currently edited file is not changed. | |
655 Note: you can also use this method: > | 657 Note: you can also use this method: > |
656 :args ## x | 658 :args ## x |
657 < This will add the "x" item and sort the new list. | 659 < This will add the "x" item and sort the new list. |
660 | |
661 :argded[upe] *:argded* *:argdedupe* | |
662 Remove duplicate filenames from the argument list. | |
663 If your current file is a duplicate, your current file | |
664 will change to the original file index. | |
658 | 665 |
659 :argd[elete] {pattern} .. *:argd* *:argdelete* *E480* *E610* | 666 :argd[elete] {pattern} .. *:argd* *:argdelete* *E480* *E610* |
660 Delete files from the argument list that match the | 667 Delete files from the argument list that match the |
661 {pattern}s. {pattern} is used like a file pattern, | 668 {pattern}s. {pattern} is used like a file pattern, |
662 see |file-pattern|. "%" can be used to delete the | 669 see |file-pattern|. "%" can be used to delete the |