I've been having a problem using Dr. Chip's visincr plugin that I
finally tracked down to this setting in my ~/.vimrc:
set cedit=<Esc>
With that setting, using :I on the example in ":help visincr-usage"
results in changing this
ORIG
+---+
| 8 |
| 8 |
| 8 |
| 8 |
+---+
to this
ORIG
+---+
8 8 |
9 8 |
10 8 |
11 8 |
+---+
with the incremented numbers moved to the left instead of replacing
the original column of 8s.
I further discovered that the problem occurs when one of these two
lines in autoload/visincr.vim is executed:
645 exe 'norm! /\%'.leftcol."v\<Esc>"
677 exe 'norm! /\%'.bkup."v\<Esc>"
I can solve the problem by surrounding that part of the code in
visincr#VisBlockIncr() with
let l:cedit = &cedit
set cedit&
and
let &cedit = l:cedit
which is what I recommend Dr. Chip do, but it bothers me that
"norm!" was not sufficient to prevent my setting of 'cedit' from
corrupting his use of "<Esc>".
Should the function of "!" in :normal and of "nore" in mappings be
extended to also ignore any non-default settings of 'cedit'?
Regards,
Gary
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Friday, March 15, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment