I'm using python-mode.el, and when I try to indent comments, it always wants to put them all the way to the left. I want them indented in line with the rest of the code. Is there an easy way to achieve this?
Asked
Active
Viewed 149 times
2 Answers
1
Recent python-mode.el comes with a customizable variable py-indent-comments When t, comment lines are indented.
get it from http://launchpad.net/python-mode

Andreas Röhler
- 4,804
- 14
- 18
0
Also running python-mode.el and when I tab a comment it cycles through the indentation levels. What version of emacs are you using?
edit getting the behavior you describe if there is a non-space immediately following the #. I always put a space after, but it sounds like a bug to me. I'd ask on the python-mode.el list.

Matt Harrison
- 1,225
- 11
- 12
-
For me it cycles, until it gets to the left margin, then it just sits there... emacs 23.1.1 – Brian Postow Oct 01 '10 at 18:01