aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-14 01:46:27 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-14 01:46:27 +1200
commitaf423a79c9689531ec71658c2dc51804ed91a8ae (patch)
treed2eb5bf6cc67005077d0fd26270394df660ea225
parentMerge branch 'hotfix/v3.0.1' (diff)
parentBump VERSION (diff)
downloadvim-insert-cancel-af423a79c9689531ec71658c2dc51804ed91a8ae.tar.gz
vim-insert-cancel-af423a79c9689531ec71658c2dc51804ed91a8ae.zip
Merge branch 'release/v3.1.0'v3.1.0
* release/v3.1.0: Bump VERSION Rewrite documentation
-rw-r--r--README.md8
-rw-r--r--VERSION2
-rw-r--r--doc/insert_cancel.txt36
3 files changed, 21 insertions, 25 deletions
diff --git a/README.md b/README.md
index e767d80..0bfb346 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,10 @@
insert\_cancel.vim
==================
-This plugin provides a mapping target to cancel an insert operation, by leaving
-insert mode normally and undoing a change if one was made by that insert
-operation. It's intended as a target for `i_CTRL-C`, to make it do something
-useful, and to fire `InsertLeave` afterwards where available.
+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.
License
-------
diff --git a/VERSION b/VERSION
index cb2b00e..fd2a018 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.0.1
+3.1.0
diff --git a/doc/insert_cancel.txt b/doc/insert_cancel.txt
index b7888b3..4adb82c 100644
--- a/doc/insert_cancel.txt
+++ b/doc/insert_cancel.txt
@@ -1,35 +1,31 @@
-*insert_cancel.txt* For Vim version 6.0 Last change: 2018 July 11
+*insert_cancel.txt* For Vim version 6.0 Last change: 2018 July 12
DESCRIPTION *insert_cancel*
-This plugin provides a mapping target to cancel an insert operation, by
-leaving insert mode normally and undoing a change if one was made by that
-insert operation. It's intended as a target for |i_CTRL-C|, to make it do
-something useful, and to fire |InsertLeave| afterwards where available.
+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 is only available if 'compatible' is not set. It works better on
-newer versions of Vim. It works best if you have |autocmd| and at least
-|version-7.0|, because it leans on |CursorMoved|.
+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
+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.
-If you don't have |autocmd| and |version7|, all the plugin has to go on are
-the |'[| and |']| marks. It still kind of works, but there are some big gaps;
-it won't undo text that was erased when insert mode was entered with |c| or
-|s| or its variants, and it also may not undo new blank lines. Even this is
-still rather better than just the intuitive mapping:
->
- imap <C-C> <Esc>u
-<
MAPPINGS *insert_cancel-mappings*
*<Plug>(InsertCancel)*
-The single mapping target provided is |<Plug>(InsertCancel)|, mappable in any
-mode. There is no default key mapping to the target; you should define this
-yourself in your |vimrc|. For example:
+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)
-
+<
AUTHOR *insert_cancel-author*
Written and maintained by Tom Ryder <tom@sanctum.geek.nz>.