v8.1 indentation change?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

v8.1 indentation change?

Keith
Hello,

I use vim in my work as a Perl developer, and since upgrading from v8.0 to v8.1 recently I'm noticing a small but slightly annoying change to the way that auto-indentation is working when I comment a line out.

If I have a line that starts, say, one tab in, and then insert a '#' char in col 1, in v8.0 that would be that, but in v8.1, the '#' char gets auto-indented to one tab in, and the remainder of the line is shifted over accordingly.

Does anyone have any handy tips on how to revert to the previous behaviour?

Thanks in advance!
k

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: v8.1 indentation change?

Paul-7
On Tue, Mar 19, 2019 at 05:24:33AM -0700, Keith wrote:
>If I have a line that starts, say, one tab in, and then insert a '#' char in col 1, in v8.0 that would be that, but in v8.1, the '#' char gets auto-indented to one tab in, and the remainder of the line is shifted over accordingly.

Could this be a plugin interfering? I can't reproduce it here.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.

signature.asc (817 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: v8.1 indentation change?

Keith
> On Thursday, 21 March 2019 13:55:34 UTC, Paul  wrote:
> > On Tue, Mar 19, 2019 at 05:24:33AM -0700, Keith wrote:
> > >If I have a line that starts, say, one tab in, and then insert a '#' char in col 1, in v8.0 that would be that, but in v8.1, the '#' char gets auto-indented to one tab in, and the remainder of the line is shifted over accordingly.
> >
> > Could this be a plugin interfering? I can't reproduce it here.

I found it in the end by installing v8.0 elsewhere and comparing the 'indent.vim' files.  The old one had this near the top:

    " Don't reindent comments on first column
    if cline =~ '^#.'
        return 0
    endif

No idea why that was removed, but putting it back works just fine :)

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: v8.1 indentation change?

Keith
On Monday, 25 March 2019 10:40:49 UTC, Keith  wrote:

> > On Thursday, 21 March 2019 13:55:34 UTC, Paul  wrote:
> > > On Tue, Mar 19, 2019 at 05:24:33AM -0700, Keith wrote:
> > > >If I have a line that starts, say, one tab in, and then insert a '#' char in col 1, in v8.0 that would be that, but in v8.1, the '#' char gets auto-indented to one tab in, and the remainder of the line is shifted over accordingly.
> > >
> > > Could this be a plugin interfering? I can't reproduce it here.
>
> I found it in the end by installing v8.0 elsewhere and comparing the 'indent.vim' files.  The old one had this near the top:
>
>     " Don't reindent comments on first column
>     if cline =~ '^#.'
>         return 0
>     endif
>
> No idea why that was removed, but putting it back works just fine :)
My bad - it was the 'perl.vim' file in the 'indent' folder.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: v8.1 indentation change?

Bram Moolenaar

> On Monday, 25 March 2019 10:40:49 UTC, Keith  wrote:
> > > On Thursday, 21 March 2019 13:55:34 UTC, Paul  wrote:
> > > > On Tue, Mar 19, 2019 at 05:24:33AM -0700, Keith wrote:
> > > > >If I have a line that starts, say, one tab in, and then insert a '#' char in col 1, in v8.0 that would be that, but in v8.1, the '#' char gets auto-indented to one tab in, and the remainder of the line is shifted over accordingly.
> > > >
> > > > Could this be a plugin interfering? I can't reproduce it here.
> >
> > I found it in the end by installing v8.0 elsewhere and comparing the 'indent.vim' files.  The old one had this near the top:
> >
> >     " Don't reindent comments on first column
> >     if cline =~ '^#.'
> >         return 0
> >     endif
> >
> > No idea why that was removed, but putting it back works just fine :)
>
> My bad - it was the 'perl.vim' file in the 'indent' folder.

It looks like this was intentionally removed.  Perhaps a matter of taste
how comments are indented?

--
hundred-and-one symptoms of being an internet addict:
118. You are on a first-name basis with your ISP's staff.

 /// Bram Moolenaar -- [hidden email] -- 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 [hidden email].
For more options, visit https://groups.google.com/d/optout.