Created
August 15, 2018 10:56
-
-
Save c02y/fac99f12303f0a1226901b9debf31735 to your computer and use it in GitHub Desktop.
comment line or region
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; (setq comment-style 'extra-line) | |
(add-hook 'c-mode-hook | |
(lambda () | |
(set (make-local-variable 'rebox-style-loop) '(241 243 111)) | |
(rebox-mode 1))) | |
(add-hook 'c++-mode-hook | |
(lambda () | |
(set (make-local-variable 'rebox-style-loop) '(21 23 111)) | |
(rebox-mode 1))) | |
;; FIXME: comment-dwim-2 doesn't work well with multiple line when comment-style is set to extra-line | |
;; So this function use comment-dwim-2 for single line, and rebox2 for multiple lines, with comment-tyle disabled | |
(bind-key* "M-;" 'comment-dwim-2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment