diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-09 17:48:07 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-09 17:48:07 +1200 |
commit | 0b86ed61400d5935b378f909a81ec3b3f6b41fea (patch) | |
tree | aec503c3ef5217bff93e2b70868d5766bba65e51 | |
parent | Merge branch 'release/v3.2.0' (diff) | |
parent | Bump VERSION (diff) | |
download | vim-insert-cancel-0b86ed61400d5935b378f909a81ec3b3f6b41fea.tar.gz vim-insert-cancel-0b86ed61400d5935b378f909a81ec3b3f6b41fea.zip |
Merge branch 'release/v3.3.0'v3.3.0
* release/v3.3.0:
Remove unneeded variable scoping
Switch to two-spacing
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | doc/insert_cancel.txt | 20 | ||||
-rw-r--r-- | plugin/insert_cancel.vim | 4 |
4 files changed, 16 insertions, 16 deletions
@@ -1,15 +1,15 @@ insert\_cancel.vim ================== -This plugin provides a mapping target to cancel an insert operation. It leaves +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 +was changed by the insert. This is intended as a remap of Ctrl-C in insert mode. License ------- -Copyright (c) [Tom Ryder][1]. Distributed under the same terms as Vim itself. +Copyright (c) [Tom Ryder][1]. Distributed under the same terms as Vim itself. See `:help license`. [1]: https://sanctum.geek.nz/ @@ -1 +1 @@ -3.2.0 +3.3.0 diff --git a/doc/insert_cancel.txt b/doc/insert_cancel.txt index 1d8ce7c..233e627 100644 --- a/doc/insert_cancel.txt +++ b/doc/insert_cancel.txt @@ -2,26 +2,26 @@ 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|. +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. It works best if you -have at least |vim7| with |autocmd|, because it leans on the |CursorMoved| -event. +This plugin only loads if 'compatible' is not set. It works best if you have +at least |vim7| with |autocmd|, because it leans on the |CursorMoved| event. If you don't have |CursorMoved|, the |'[| and |']| marks are used to detect -changes instead. This still works for undoing insert additions, but it won't +changes instead. This still works for undoing insert additions, but it won't restore text that was erased when insert mode was entered with |c| or |s| or their variants, and it doesn't undo new unindented blank lines. 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 +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) @@ -29,7 +29,7 @@ example: 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 +you can't cancel an insert operation while pasting. You might consider this a feature. AUTHOR *insert_cancel-author* diff --git a/plugin/insert_cancel.vim b/plugin/insert_cancel.vim index 18bd0ac..8ad47e5 100644 --- a/plugin/insert_cancel.vim +++ b/plugin/insert_cancel.vim @@ -8,13 +8,13 @@ " Author: Tom Ryder <tom@sanctum.geek.nz> " License: Same as Vim itself " -if exists('g:loaded_insert_cancel') || &compatible +if exists('loaded_insert_cancel') || &compatible finish endif if v:version < 600 finish endif -let g:loaded_insert_cancel = 1 +let loaded_insert_cancel = 1 " On leaving insert mode, whether normally or via <Plug>(InsertCancel), check " if changenr() exceeds the last time we cached it, and flag that a change has |