When I toggle on comments in makefile tasks with editor.action.commentLine, then I want the # to appear at the very start of the line, not nested after a tab.
make, unlike other common scripting languages, treats /^\t#...$/ as an actual command to send to the shell interpreter. Which produces ugly traces on UNIX terminals, and syntax errors on Command Prompt terminals.
When enabling comments for commands in a makefile rule, please stop the usual indentation and whitespace behavior, and just insert #\t at the very start of the line. When disabling comments, drop the # prefix from the start of the line.
Examples
Bad:
all:
# @rustup component add clippy
Good:
all:
# @rustup component add clippy
Commenting other regions of a makefile are probably fine with the existing behavior.
@mcandre Thank you for the post and the suggestion! We will make sure to take note of this as we investigate supporting things like Intellisense and colorization in makefiles.
When I toggle on comments in makefile tasks with
editor.action.commentLine
, then I want the#
to appear at the very start of the line, not nested after a tab.make, unlike other common scripting languages, treats
/^\t#...$/
as an actual command to send to the shell interpreter. Which produces ugly traces on UNIX terminals, and syntax errors on Command Prompt terminals.When enabling comments for commands in a makefile rule, please stop the usual indentation and whitespace behavior, and just insert
#\t
at the very start of the line. When disabling comments, drop the#
prefix from the start of the line.Examples
Bad:
Good:
Commenting other regions of a makefile are probably fine with the existing behavior.