Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I use /* ... */ comments instead of // comments? #509

Open
lumenwrites opened this issue Nov 28, 2018 · 1 comment
Open

How can I use /* ... */ comments instead of // comments? #509

lumenwrites opened this issue Nov 28, 2018 · 1 comment

Comments

@lumenwrites
Copy link

Hi! I'm new to this mode, can you help me to figure out how to tell emacs to comment stuff like this /* ...*/ when I press M-;? All my comments are using this format, and without this feature it becomes very difficult to adjust.

@lambdadog
Copy link

This should work pretty well (stolen from css-mode)

(add-hook 'js2-mode-hook
	  (lambda ()
	    (setq-local comment-start "/*")
	    (setq-local comment-start-skip "/\\*+[ \t]*")
	    (setq-local comment-end "*/")
	    (setq-local comment-end-skip "[ \t]*\\*+/")))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants