vim-scripts / redocommand Goto Github PK
View Code? Open in Web Editor NEWExecute commands from the command history.
Home Page: http://www.vim.org/scripts/script.php?script_id=1661
Execute commands from the command history.
Home Page: http://www.vim.org/scripts/script.php?script_id=1661
This is a mirror of http://www.vim.org/scripts/script.php?script_id=1661 DESCRIPTION Re-executes the last / Nth ex command previously entered in command mode. An optional pattern is used to locate the most recent matching command. This is similar to the command-line window (q:), or navigating the command history via <Up> and <Down>, but provides an even faster way to re-execute a command if you remember some characters or a pattern that identifies the command line. The redocommand itself will not be included in the command history. Global literal replacement can be done via 'old=new' arguments. This is modeled after the 'fc -s' command from the Posix shell (which is often aliased to 'r'). USAGE :[N]Redocommand (or abbreviated :R) Execute the last / Nth ex command. :[N]Redocommand {pattern} Execute the last / Nth ex command that matches {pattern}. Settings such as 'magic' and 'ignorecase' apply. With N=0, only the very last command from the history is executed if it matches {pattern}; the entire history isn't searched. Note: If the {pattern} starts with : (and there is no history command matching the literal ":cmd"), the history is searched for "cmd", anchored at the beginning. This is convenient because ":R :echo" is more intuitive to type than ":R ^echo". :[N]Redocommand {old}={new} [{old2}={new2} ...] [{pattern}] Execute the last / Nth ex command (that matches {pattern}), replacing all literal occurrences of {old} with {new}. :[N]RedoRepeat [{old}={new} ...] (or abbreviated :RR) Execute the last / Nth ex command that was repeated via :Redocommand. Any replacements done the last time are still in effect; new replacements of {old} to {new} can be added. The following variants are useful when you repeatedly use command A in one buffer and command B in another. Instead of passing different [N] values to :RedoRepeat, just recall from the local redo history. :[N]RedoBufferRepeat [{old}={new} ...] (or abbreviated :RB) Like :RedoRepeat, but repeat the last / Nth ex command repeated in the current buffer. :[N]RedoWindowRepeat [{old}={new} ...] (or abbreviated :RW) Like :RedoRepeat, but repeat the last / Nth ex command repeated in the current window. EXAMPLE Given the following history: :history 1 e foo.txt 2 %s/foo/\0bar/g 3 w bar.txt :Redocommand will execute :w bar.txt :Redocommand % will execute :%s/foo\0/bar/g :Redocommand foo will execute :%s/foo\0/bar/g :2Redocommand foo will execute :e foo.txt :Redocommand b=B .txt= will execute ':w bar.txt' as :w Bar :echo "another command" :RedoRepeat will again execute :w Bar :2RedoRepeat will execute :%s/foo\0/bar/g :RedoRepeat B=F will execute :w Far :Redocommand will execute :echo "another command" :RedoRepeat will execute :w Far
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.