73380Re: 'cindent' and 'cinkeys' with 0# inhibits >> of lines with # in column 1
- Sep 25, 2013Gary Johnson wrote:
> On 2013-09-25, Ben Fritz wrote:If you see the ">" command as increasing indent then it makes perfect
> > On Wednesday, September 25, 2013 6:18:00 AM UTC-5, Bram Moolenaar wrote:
> > >
> > >
> > > For portability and readability I would encourage keeping the # in the
> > >
> > > first column.
> > Agree, that makes sense. And thus the default 'cindent' settings
> > should also place it in the first column.
> > > Allowing to put it elsewhere should be an option that is
> > >
> > > off by default.
> > >
> > I thought at first it is very strange Vim would EVER ignore a
> > specific user command to indent a line, but then realized this is
> > because I'm thinking about '>>'.
> > More dangerous would be using >aB, without knowing there are
> > preprocessor lines in that code block. Then it actually makes
> > sense to keep those in the first line.
> I disagree.
> If I execute =aB, then I am telling the editor to use its judgement
> and its indentation rules to indent all the lines in that block,
> which may well include shifting preprocessor lines all the way to
> the left.
> However, if I execute >aB, I am telling the editor explicitly that
> I want all the lines in that block to be shifted to the right. It
> is my choice and my judgement that that is the right thing to do.
> The > command should mean "shift", not "shift unless the editor
> thinks it knows better than the user."
sense that indenting rules apply. For the same reason 'shiftwidth' is
used for indenting.
ARTHUR: (as the MAN next to him is squashed by a sheep) Knights! Run away!
Midst echoing shouts of "run away" the KNIGHTS retreat to cover with the odd
cow or goose hitting them still. The KNIGHTS crouch down under cover.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- Bram@... -- 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_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
For more options, visit https://groups.google.com/groups/opt_out.
- << Previous post in topic Next post in topic >>