Loading ...
Sorry, an error occurred while loading the content.

136807Re: Setting cedit= causes vimincr :I to fail

Expand Messages
  • Ben Fritz
    Mar 19 10:34 AM
    • 0 Attachment
      On Tuesday, March 19, 2013 11:59:46 AM UTC-5, Christian Brabandt wrote:
      > On Tue, March 19, 2013 17:43, Gary Johnson wrote:
      >
      > > On 2013-03-19, Christian Brabandt wrote:
      >
      > >> On Fri, March 15, 2013 20:29, Gary Johnson wrote:
      >
      > >>
      >
      > >> > Should the function of "!" in :normal and of "nore" in mappings be
      >
      > >> > extended to also ignore any non-default settings of 'cedit'?
      >
      > >>
      >
      > >> I think, plugin writers should take care of properly escaping
      >
      > >> the cedit key by themselves. That is, if they issue a search like this
      >
      > >> :exe "norm! /"
      >
      > >> they need to take care to replace the cedit key by Ctrl-V cedit key.
      >
      > >
      >
      > > But the writer in this case was not trying to use the cedit key--he
      >
      > > was innocently using another key (<Esc>) that I had chosen to be the
      >
      > > cedit key.
      >
      >
      >
      > I don't see, how this is different from other settings that might
      >
      > interfer plugins (e.g. 'gdefault', 'magic', 'remap', 'ed').
      >
      >
      >
      > Say you don't want to use the search() function,
      >
      > but want to use
      >
      > :exe variable
      >
      > with variable being something like 'norm! /....<Esc>'
      >
      >
      >
      > There shouldn't be a problem with first substituting that variable by
      >
      > :let variable = substitute(variable, &cedit, '^V'.&cedit, 'g')
      >
      > where ^V is the literal Ctrl-V (and not the 2 distinct characters ^ and V)
      >
      >

      I think this use case is different. The plugin writer is already trying to be careful, by using :norm! instead of :norm to avoid user mappings.

      Besides cedit, are there other options which need escaping? Maybe 'pastetoggle'? Any others?

      --
      --
      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@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 9 messages in this topic