On Wed, September 25, 2013 13:18, Bram Moolenaar wrote: > > Christian Brabandt wrote: > >> On Di, 24 Sep 2013, Gary Johnson wrote: >> >> > On 2013-09-24, Christian Brabandt wrote: >> > > >> > > I guess, the intention is, that in C code the defines need to be in >> the >> > > first column. >> > >> > Thanks for checking that. >> > >> [...] >> > Vim's behavior looks to me like a mistake in someone's understanding >> > of C. >> > >> > I could see an indentation function moving lines beginning with # to >> > the left, but preventing the user from executing a command to >> > deliberately shift a line seems a little extreme. >> >> Indeed, it looks strange. Especially, since left shifts are allowed, but >> once you reach column 1, you can't right shift anymore. Also note, that >> despite Vim's inability to right shift defines, the file will still be >> marked modified. >> >> Here is a simple patch, allowing the user to right shift #defines. > > Allowing white space before the # is later addition, older C compilers > do not allow it. My K&R does not mention it. And because of that it > has been a convention to keep the # in the first column and put any > indent after it. > > For portability and readability I would encourage keeping the # in the > first column. Allowing to put it elsewhere should be an option that is > off by default.
An addition to cinkeys? Or a separate option? regards, Christian -- -- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
