有没有办法让emacs光标位于空行时变成“更薄”条?如果该行包含空格或文本,则它应该是默认的宽度块游标。这适用于emacs 24。
这是XEmacs上的默认游标行为,FWIW。
答案 0 :(得分:4)
要动态更改光标,请根据当前行的内容将其添加到.emacs
:
(defun cursor-shape-hook ()
(if (equal (thing-at-point 'line) "\n") (setq cursor-type 'bar)
(setq cursor-type 'box)))
(add-hook 'post-command-hook 'cursor-shape-hook)
光标形状的所有可能性是:
nil don't display a cursor
box display a filled box cursor
hollow display a hollow box cursor
bar display a vertical bar cursor with default width
(bar . WIDTH) display a vertical bar cursor with width WIDTH
hbar display a horizontal bar cursor with default height
(hbar . HEIGHT) display a horizontal bar cursor with height HEIGHT
ANYTHING ELSE display a hollow box cursor