Tuesday, September 15, 2015

Re: Should 'paste' disable 'smarttab'?

Christian Brabandt wrote:

> On Do, 10 Sep 2015, Alexander Monakov wrote:
>
> (CC'ing vim-dev)
>
> > Hello,
> >
> > I wonder if there's any reason that smarttab is enabled in paste mode? Consider:
> >
> > $ vim -u NONE
> > :set nocp
> > :set sw=2
> > :set smarttab
> > :set paste
> > i<tab>
> >
> > This inserts two spaces rather than a tab character in paste-mode, seemingly in contradiction of the paste-mode's purpose. There's a number of options that are temporarily disabled when paste mode is entered, shouldn't 'smarttab' be added to the list?
> >
> > (if it was discussed in the past, please point me; I couldn't find anything)
>
> Thanks, this must have been there for very long and nobody noticed. Here
> is a patch, to fix this.

Thanks. I think we should do the same for 'expandtab'. When pasting
with the middle mouse button and Vim handles it the Tabs are not
expanded either. 'paste' mode should work the same way, it's like using
a put command.


--
The word "leader" is derived from the word "lead", as in the material that
bullets are made out of. The term "leader" was popularized at about the same
time as the invention of firearms. It grew out of the observation that the
person in charge of every organization was the person whom everyone wanted to
fill with hot lead.
I don't recomment this; it's just a point of historical interest.
(Scott Adams - The Dilbert principle)

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
--
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/d/optout.

No comments: