anyway change the cursor “vertical line” instead of a box? [closed]

两盒软妹~` 提交于 2020-05-24 21:35:28

问题


Is there any way to change the cursor to a "vertical line" instead of a box in XTERM?

box: ■

line: |


回答1:


I don't think making the cursor a vertical line is possible in xterm. It is possible, however, to make it underlined. Just run xterm -uc.

It might be possible to do what you want using another terminal emulator. For example, I use Konsole and I can set the cursor shape to "Block", "I-Beam" and "Underline".




回答2:


It seems xterm has added support for the vertical bar or I-beam cursor.

You can change the cursor by inserting one of the following lines in your ~/.bashrc file (if you use bash):

echo -e -n "\x1b[\x30 q" # changes to blinking block
echo -e -n "\x1b[\x31 q" # changes to blinking block also
echo -e -n "\x1b[\x32 q" # changes to steady block
echo -e -n "\x1b[\x33 q" # changes to blinking underline
echo -e -n "\x1b[\x34 q" # changes to steady underline
echo -e -n "\x1b[\x35 q" # changes to blinking bar
echo -e -n "\x1b[\x36 q" # changes to steady bar

References:

  • https://code.google.com/p/iterm2/issues/detail?id=2248



回答3:


This depends on the Terminal emulator you're on.

Try looking at the menu:preferences:Window:cursortype if there's any.

I've seen changing the terminal cursor in Mac/Apple's terminal. Try to see in your linux box.



来源:https://stackoverflow.com/questions/4416909/anyway-change-the-cursor-vertical-line-instead-of-a-box

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!