You could create a command, which gobbles its argument, such as in the comment here: Control command arguments:
\newcommand{\comment}[1]{}
If you just wish to gobble a character, name it so and use it like
\newcommand*{\commentchar}[1]{}
Text \commentchar()
which results in Text ).
Another way, shown by Joseph on LaTeX-Community.org is defining an active character for that, such as in this minimal example:
\documentclass{article}
\catcode`\|=\active
\def|#1|{}
\begin{document}
Text |ignored|Text
\end{document}
You have to take care of the spacing (blanks before and after) and possible side effects. This environment-way is fine, though again vim might unserstand that it's commented out, unlinke the \commentchar way.
)in any way for me. Also note that your definition introduces three spaces, which will appear when the command is used. Add%at line ends to remove the spaces. Finally, how about tryingtitlesecfor this task? – Andrey Vihrov Mar 06 '11 at 10:47\renewcommand...{%(fix your paren problem? – Ulrich Schwarz Mar 06 '11 at 10:51%tip; I didn't think it would work because of the indentation. I'll look inteotitlesec. – Tim N Mar 06 '11 at 10:55