若希望光标设置为竖线,在当前用户目录下(比如我的是 /home/zhang 目录),打开 .emacs 文件,加入一行
(setq-default cursor-type 'bar) ; 设置光标为竖线
若希望光标设置为黑方块,则加入一行
(setq-default cursor-type 'box) ; 设置光标为方块
保存完毕,重启emacs即可
将Emacs光标显示设置为竖线(已解决)
- microdust
- 帖子: 164
- 注册时间: 2007-05-24 17:04
-
- 帖子: 40
- 注册时间: 2009-11-13 17:48
Re: 将Emacs光标显示设置为竖线(已解决)
使用,谢了 :em0
- croner
- 帖子: 737
- 注册时间: 2009-05-31 17:40
- 来自: NO
- ibear
- 帖子: 787
- 注册时间: 2006-10-19 8:43
- 来自: 长江口
Re: 将Emacs光标显示设置为竖线(已解决)
cursor-type is a variable defined in `C source code'.croner 写了:下划线怎么设置呢?
Its value is t
Automatically becomes buffer-local when set in any fashion.
Documentation:
Cursor to use when this buffer is in the selected window.
Values are interpreted as follows:
t use the cursor specified for the frame
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
When the buffer is displayed in a non-selected window, the
cursor's appearance is instead controlled by the variable
`cursor-in-non-selected-windows'.
好好地做一个碌碌无为的人