将Emacs光标显示设置为竖线(已解决)

Vim、Emacs配置和使用
回复
头像
microdust
帖子: 164
注册时间: 2007-05-24 17:04

将Emacs光标显示设置为竖线(已解决)

#1

帖子 microdust » 2009-11-16 16:25

若希望光标设置为竖线,在当前用户目录下(比如我的是 /home/zhang 目录),打开 .emacs 文件,加入一行
(setq-default cursor-type 'bar) ; 设置光标为竖线
若希望光标设置为黑方块,则加入一行
(setq-default cursor-type 'box) ; 设置光标为方块
保存完毕,重启emacs即可
wenqungang
帖子: 40
注册时间: 2009-11-13 17:48

Re: 将Emacs光标显示设置为竖线(已解决)

#2

帖子 wenqungang » 2009-12-05 12:21

使用,谢了 :em0
头像
croner
帖子: 737
注册时间: 2009-05-31 17:40
来自: NO

Re: 将Emacs光标显示设置为竖线(已解决)

#3

帖子 croner » 2009-12-05 23:17

下划线怎么设置呢?
No.
头像
ibear
帖子: 787
注册时间: 2006-10-19 8:43
来自: 长江口

Re: 将Emacs光标显示设置为竖线(已解决)

#4

帖子 ibear » 2009-12-08 14:06

croner 写了:下划线怎么设置呢?
cursor-type is a variable defined in `C source code'.
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'.
好好地做一个碌碌无为的人
回复