Loading ...
Sorry, an error occurred while loading the content.

102993Re: Creating a new undo block

Expand Messages
  • Ben Fritz
    Apr 1 1:31 PM
      On Apr 1, 12:31 pm, Spiros Bousbouras <spi...@...> wrote:

      > > so you'd do something like
      >
      > >    imap <f1> <c-g>u<esc>:call Add_line()<cr>
      >
      > This works , thank you. Anyone knows if it's possible to achieve
      > the same effect from within a script ?

      I have this in my .vimrc, to create undo blocks on the rare occasions
      I leave Vim sitting in insert mode (usually by accident):

      > autocmd CursorHoldI * call feedkeys("\<C-G>u", "nt")

      :help feedkeys()

      I'm not sure in what other contexts this could be used.
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Show all 9 messages in this topic