无论如何改变光标“垂直线”而不是一个盒子?

时间:2022-09-03 00:18:49

anyway change the cursor "vertical line" instead of a box?

无论如何改变光标“垂直线”而不是一个盒子?

box: ■

盒子:■

line: |

line:|

sorry i'm using XTERM

抱歉,我正在使用XTERM

3 个解决方案

#1


3  

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.

我不认为在xterm中可以使光标成为垂直线。但是,可以强调它。只需运行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".

可能可以使用其他终端仿真器执行您想要的操作。例如,我使用Konsole,我可以将光标形状设置为“Block”,“I-Beam”和“Underline”。

#2


17  

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

似乎xterm增加了对垂直条或工字梁光标的支持。

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

您可以通过在〜/ .bashrc文件中插入以下行之一来更改光标(如果使用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:

参考文献:

#3


0  

This depends on the Terminal emulator you're on.

这取决于您所在的终端仿真器。

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

尝试查看菜单:preferences:Window:cursortype如果有的话。

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

我见过在Mac / Apple终端上更改终端光标。试着在你的linux框中看到。

#1


3  

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.

我不认为在xterm中可以使光标成为垂直线。但是,可以强调它。只需运行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".

可能可以使用其他终端仿真器执行您想要的操作。例如,我使用Konsole,我可以将光标形状设置为“Block”,“I-Beam”和“Underline”。

#2


17  

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

似乎xterm增加了对垂直条或工字梁光标的支持。

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

您可以通过在〜/ .bashrc文件中插入以下行之一来更改光标(如果使用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:

参考文献:

#3


0  

This depends on the Terminal emulator you're on.

这取决于您所在的终端仿真器。

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

尝试查看菜单:preferences:Window:cursortype如果有的话。

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

我见过在Mac / Apple终端上更改终端光标。试着在你的linux框中看到。