nha
nha

Reputation: 18005

Emacs - define comments function

I am looking for an Emacs command to produce comments like the following :

;;===============================================
;; This is some text

Upvotes: 0

Views: 41

Answers (1)

djangoliv
djangoliv

Reputation: 1788

Here a solution with wrap-region https://github.com/rejeep/wrap-region.el

;; example configuration
(require 'wrap-region)
(add-to-list 'wrap-region-except-modes 'web-mode)
(wrap-region-global-mode t)
(wrap-region-add-wrapper ";;========================================\n;; " "" "#" 'emacs-lisp-mode)

Then select the line you want to comment and #

Upvotes: 1

Related Questions