aboutsummaryrefslogblamecommitdiff
path: root/doc/insert_cancel.txt
blob: 9e0deda87f5dcef65a97d0b7dcb97b41d007891a (plain) (tree)
1
2
3
4
5
6
7
8
                                                                        


                                                       



                                                                           


                                                                    
                                                  
 

                                                                
                                                              

                                                                             
        
 
                                       
 


                                                                              
                                                                              

        








                                                                             
*insert_cancel.txt*	For Vim version 7.0	Last change: 2019 May 25

DESCRIPTION				*insert_cancel*

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
|i_CTRL-C|.

REQUIREMENTS				*insert_cancel-requirements*

This plugin only loads if 'compatible' is not set.

MAPPINGS				*insert_cancel-mappings*

					*<Plug>(InsertCancel)*
The single insert mode mapping target is |<Plug>(InsertCancel)|.  There is no
default key mapping; you should define one yourself in your |vimrc|.  For
example:
>
	imap <C-C> <Plug>(InsertCancel)
<
ISSUES					*insert_cancel-issues*

It doesn't work at all in paste mode, in the same way as any other mapping, so
you can't cancel an insert operation while pasting.  You might consider this a
feature.

AUTHOR					*insert_cancel-author*

Written and maintained by Tom Ryder <tom@sanctum.geek.nz>.

LICENSE					*insert_cancel-license*

Licensed for distribution under the same terms as Vim itself (see |license|).

 vim:tw=78:ts=8:ft=help:norl: