in reply to Re^2: Slightly Off Topic: vim/perl comment behavior
in thread Slightly Off Topic: vim/perl comment behavior

Vim's smartindent was designed mainly with C in mind. In C, the '#' is used for preprocessor directives, which are usually placed at the beginning of the line (I think some versions of the C preprocessor even require them to be at the beginning of the line, but I'm not sure).

Added: Yep, it seems that "traditional" C only recognized preprocessor directives in column 1. With gcc, you can emulate this behavior by supplying the '-traditional-cpp' option.

  • Comment on Re^3: Slightly Off Topic: vim/perl comment behavior