defunkt / coffee-mode

Emacs Major Mode for CoffeeScript
http://ozmm.org/posts/coffee_mode.html
574 stars 147 forks source link

coffee-newline-and-indent when in comment. #325

Closed zw963 closed 8 years ago

zw963 commented 8 years ago
# some comment <= here run coffee-newline-and-indent

will result in

# some comment
# I

I don't know this is bug? or intentionally?

But, if I just want to add one line comment, this function is not good. otherwize, emacs exist add new comment command too (indent-new-comment-line)

syohex commented 8 years ago

I don't know this is bug? or intentionally?

Intentionally.

But, if I just want to add one line comment, this function is not good.

I think so. However coffee-mode behaves like that before I maintain. So it is difficult to change it for compatibility. Please change your configuration as below if you dislike default behavior.

(define-key coffee-mode-map (kbd "C-m") 'nil) ;; normal new line command
(define-key coffee-mode-map (kbd "C-j") 'coffee-newline-and-indent)
zw963 commented 8 years ago

Thanks.