auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (Un)comment line(s) with markers at arbitrary position(s) in this/th


From: Tassilo Horn
Subject: Re: (Un)comment line(s) with markers at arbitrary position(s) in this/these line.
Date: Tue, 02 May 2023 21:06:16 +0200
User-agent: mu4e 1.11.4; emacs 30.0.50

Hongyi Zhao <hongyi.zhao@gmail.com> writes:

> I want to have the feature of (Un)comment a line or several lines with
> markers at an arbitrary position(s) in/spanning this/these line(s).

Use comment-line instead of comment-dwim.

--8<---------------cut here---------------start------------->8---
C-x C-; runs the command comment-line (found in global-map), which is an
interactive byte-compiled Lisp function in ‘newcomment.el’.

It is bound to C-x C-;.

(comment-line N)

Comment or uncomment current line and leave point after it.
With positive prefix, apply to N lines including current one.
With negative prefix, apply to -N lines above.  Also, further
consecutive invocations of this command will inherit the negative
argument.

If region is active, comment lines in active region instead.
Unlike ‘comment-dwim’, this always comments whole lines.
--8<---------------cut here---------------end--------------->8---

Bye,
Tassilo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]