RepeatLast.vim : Provides <count>\. to repeat the last group of actions you performed.
| script karma |
Rating 4/1,
Downloaded by 69
|
Comments, bugs, improvements
|
Vim wiki
|
| created by |
| joey twiddle |
| |
| script type |
| utility |
| |
| description |
" Provides <count>\. to repeat the last group of actions you performed.
"
" The '.' key is fantastic at repeating the last 1 action you made. But
" sometimes I do three actions, and then want to repeat them again. Now
" this is just 3\.
" == Usage ==
"
" Assuming your mapleader is backslash (the default):
"
" \? Display a list of recently recorded actions
"
" 4\? Display the last four recorded actions
"
" 4\. Repeat the last four actions
"
" \. Repeat the last action (similar to . but may replay just a movement)
"
" \D Forget (drop) the last action (e.g. to discard an unwanted movement)
"
" 3\D Drop the last 3 recorded actions (useful to get back to earlier state)
"
" \| or \# Temporarily disable recording of the next few actions.
"
" Commands are also available for the main shortcuts above:
"
" :ShowRecent :RepeatLast :DropLast :PauseRecording
"
" Commands to toggle state at runtime:
"
" :RepeatLastOn Disables action recording, leaves macro record mode.
"
" :RepeatLastOff Enables action recording, enters macro record mode.
"
" :RepeatLast<Tab> or :RepeatLast<Ctrl-D> More commands, to toggle info.
"
" New feature - Auto Ignoring:
"
" After executing a repeat action, action storage will be *temporarily
" disabled* for the number of actions specified in:
"
" g:RepeatLast_Ignore_After_Use_For
"
" This allows you to move to a new location between executing repeats,
" without recording those movement actions. (Movement actions in the
" *original* executed repeat remain in history so can still be repeated.)
"
" Action storage can also be temporarily disabled with \| or \#
"
" Once you have performed enough actions without executing a repeat, action
" storage will be re-enabled, and the ignored actions will be added to the
" history as one large entry.
" == Limitations ==
"
" It uses macro recording ALL THE TIME. The word "recording" will forever be
" displayed in your command-line, hiding any messages usually displayed there
" by Vim's echo. To make those hidden messages visible, you will need to:
"
" :set cmdheight=2 or more
"
" (This is preferable to adding frequent calls to sleep, which pause Vim long
" enough to show messages, but can slow down / lock up Vim when we are
" pressing a lot of keys.)
"
" If you want to record your own macro, you can disable the plugin with
" :RepeatLastOff (or you could try just pressing 'q' for a one-time disable).
"
" CursorHold events do not fire in macro-recording mode. Any visual tools,
" taglist updates, etc. that require CursorHold *will not be triggered*.
" Other events such as CursorMove, InsertLeave, BufWritePost work fine.
|
| |
| install details |
Drop it in plugin/ folder.
Latest version at http://hwi.ath.cx/code/home/.vim/plugin/RepeatLast.vim
|
| |
script versions (upload new version)
Click on the package to download.
ip used for rating: 54.226.5.29
|