Giter Club home page Giter Club logo

undoins.vim's Introduction

This is a mirror of http://www.vim.org/scripts/script.php?script_id=150

- 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 <C-W> 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, <C-W> and <C-U> 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 <C-X><C-U> which you can
  customize by using the <Plug>UndoInInsModeUndoKey mapping) that you can
  execute to put back the text at the current cursor position. A <C-X><C-U>
  immediately followed by a <C-U> or <C-W> 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.


Search_key_words: undo insert mode undoins undoins.vim Hari Krishna Dara

undoins.vim's People

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.