Minor updates to help

9 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Jun 13, 2021, 1:37:18 PM6/13/21
to vim_dev
Hi,

The help mentions that when 'paste' is set, the 'smartindent' option
will be reset. But it currently doesn't work this way. The 'smartindent'
option is not disabled when 'paste' is set. I am attaching a minor update
to the help text to remove this.

- Yegappan
help.diff

Christian Brabandt

unread,
Jun 13, 2021, 1:46:22 PM6/13/21
to vim_dev
Shouldn't we rather fix the code? so that when paste is in effect, vim
would not indent lines based on what is pasted.

Best,
Christian
--
O du alter Kakadu
Stets gedenk ich Kakadeiner
Ich mißtraue Kakadir
und verwünsche Kakadich.

Das Gegenteil eines Kaka-du ist übrigens nicht ein Pingu-ihn.)

Yegappan Lakshmanan

unread,
Jun 13, 2021, 2:31:48 PM6/13/21
to vim_dev
Hi Christian,

On Sun, Jun 13, 2021 at 10:46 AM Christian Brabandt <cbl...@256bit.org> wrote:
>
>
> On So, 13 Jun 2021, Yegappan Lakshmanan wrote:
>
> > Hi,
> >
> > The help mentions that when 'paste' is set, the 'smartindent' option
> > will be reset. But it currently doesn't work this way. The 'smartindent'
> > option is not disabled when 'paste' is set. I am attaching a minor update
> > to the help text to remove this.
>
> Shouldn't we rather fix the code? so that when paste is in effect, vim
> would not indent lines based on what is pasted.
>

Yes. I noticed this when adding a test for this. It makes sense to
disable smartindent when 'paste' is set and restore the old value
when 'paste' is disabled.

- Yegappan

Christian Brabandt

unread,
Jun 13, 2021, 2:50:08 PM6/13/21
to vim_dev

On So, 13 Jun 2021, Yegappan Lakshmanan wrote:

> Hi Christian,
>
> On Sun, Jun 13, 2021 at 10:46 AM Christian Brabandt <cbl...@256bit.org> wrote:
> >
> >
> > On So, 13 Jun 2021, Yegappan Lakshmanan wrote:
> >
> > > Hi,
> > >
> > > The help mentions that when 'paste' is set, the 'smartindent' option
> > > will be reset. But it currently doesn't work this way. The 'smartindent'
> > > option is not disabled when 'paste' is set. I am attaching a minor update
> > > to the help text to remove this.
> >
> > Shouldn't we rather fix the code? so that when paste is in effect, vim
> > would not indent lines based on what is pasted.
> >
>
> Yes. I noticed this when adding a test for this. It makes sense to
> disable smartindent when 'paste' is set and restore the old value
> when 'paste' is disabled.

Yeah´, We had a similar issue a couple of years ago with smarttab and
expandtab, see (54f018cd5994c3ffcd0740526e56db6934edf1f2 (tag:
v7.4.868))

Best,
Christian
--
Jambus:
Bluesmusikerfahrzeug

Bram Moolenaar

unread,
Jun 13, 2021, 3:40:26 PM6/13/21
to vim...@googlegroups.com, Yegappan Lakshmanan
I think 'smartindent' belongs to the second list, options that keep
their value but their effect is disabled.

'formatoptions' also belongs in the second list.

--
I have read and understood the above. X________________

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages