Vim: Desfazendo uso acidental co ^u ou ^w no modo insert do vim

A descrição do plugin em inglês (te vira com a tradução meu filho)

description - Vim provides a number or ways to recover some text that you have deleted
  (multiple undos, numbered registers, unnamed register etc.), however,
  there is no way to recover a line or word that you killed either
  accidentally (e.g., pressing one extra time) or deliberately if you
  are already in insert mode.
- This little script tries to compensate for this missing functionality for
  the most commonly used two commands, and such that the text
  that is going to be killed is first backed up in an internal script
  variable before letting Vim continue to do what you asked it to do.
- The script also provides a mapping (by default which you can
  customize by using the UndoInInsModeUndoKey mapping) that you can
  execute to put back the text at the current cursor position. A
  immediately followed by a or is effectively works like an undo
  of the previous action.
- The script is only going to "estimate" what is going to be deleted by ^W,
  but for certain filetypes it may not exactly match the word that Vim is
  going to delete, in which case the undo might undo too much or too little.


This is essentially a 6.0 version of my previous undoInInsertMode.vim script,
  except that the script works much better now for ^W, thanks to Luc Hermitte
  (hermitte at laas dot fr) for helping me get this done.  



O link para baixar
http://www.vim.org/scripts/script.php?script_id=150

Nenhum comentário:

Postar um comentário

Insira seu comentário - O mesmo será submetido à aprovação!

linux-cookbook

Grupos do Google
Participe do grupo linux-cookbook
E-mail:
Visitar este grupo