sponsor Vim development Vim logo Vim Book Ad

insert_cancel.vim : Cancel an insert mode operation

 script karma  Rating 8/6, Downloaded by 652  Comments, bugs, improvements  Vim wiki

created by
Tom Ryder
 
script type
utility
 
description
This plugin provides a mapping target to cancel an insert operation. It leaves insert mode normally, firing InsertLeave, and then runs :undo if the buffer was changed by the insert. This is intended as a remap of Ctrl-C in insert mode.

https://dev.sanctum.geek.nz/cgit/vim-insert-cancel.git/
 
install details
Drop plugin/insert_cancel.vim in your ~/.vim/plugin directory. Add doc/insert_cancel.txt in ~/.vim/doc if you want the help file. Otherwise, use your favourite Vim plugin package manager.

To remap insert CTRL-C to use this instead of its default function, you could put this in your vimrc:

    imap <C-C> <Plug>(InsertCancel)
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-insert-cancel-3.1.1.tar.gz 3.1.1 2018-09-06 7.0 Tom Ryder Use BufEnter event for setup
ip used for rating: 142.132.191.50

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github