by Ingo Karkat
This plugin combines the buffer cloning functionality of clone.vim (vimscript #4896) with the selection of similar files provided by EditSimilar.vim (vimscript #2544) to provide :CloneSubstitute, :ClonePlus etc. command variants of the original :CloneAs command.
:[range]ClonePlus[!], :CloneMinus[!], :CloneSubstitute[!], :CloneRoot[!]
:[range]SClonePlus[!], :SCloneMinus,[!] :SCloneSubstitute[!], :SCloneRoot[!]
Duplicate and edit the current buffer to a file with a
similar name, using the substitutions and iterations
provided by the EditSimilar.vim plugin.
Writes over existing buffer with [!].
The code is hosted in a Git repo at https://github.com/inkarkat/vim-cloneSimilar You can use your favorite plugin manager, or "git clone" into a directory used for Vim packages. Releases are on the "stable" branch, the latest unstable development snapshot on "master".
This script is also packaged as a vimball. If you have the "gunzip" decompressor in your PATH, simply edit the *.vmb.gz package in Vim; otherwise, decompress the archive first, e.g. using WinZip. Inside Vim, install by sourcing the vimball or via the :UseVimball command.
vim cloneSimilar*.vmb.gz
:so %
To uninstall, use the :RmVimball command.
- Requires Vim 7.0 or higher.
- Requires the clone.vim plugin (vimscript #4896), version 1.00 or higher.
- Requires the EditSimilar.vim plugin (vimscript #2544), version 2.40 or higher.
Report any bugs, send patches, or suggest features via the issue tracker at https://github.com/inkarkat/vim-cloneSimilar/issues or email (address below).
- ENH: :CloneAs (version 1.10 or later) now supports [!].
- ENH: Support partial cloning of :[range].
- First published version.
- Started development.
Copyright: (C) 2011-2024 Ingo Karkat - The VIM LICENSE applies to this plugin.
Maintainer: Ingo Karkat <ingo@karkat.de>