【问题标题】:urxvt cursor shape set to |urxvt 光标形状设置为 |
【发布时间】:2012-12-01 20:56:15
【问题描述】:

在插入模式下,我希望在 vim 中将光标设置为 |(在 gnome-terminal 中很容易,但我想切换到 urxvt)。我没有找到好方法(_ 是可能的,但我真的更喜欢 | )。我敢肯定,只要有一点想象力,在 urxvt 中一切皆有可能。

有没有你知道的方法(或者只是一个想法)?

【问题讨论】:

  • 你在 gnome-terminal 中是怎么做的?
  • 在我的 .vimrc 中:如果 has("autocmd") au InsertEnter * 静默执行 "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Profile1/cursor_shape ibeam " au InsertLeave * 静默执行 "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Profile1/cursor_shape 块" au VimLeave *静默执行 "!gconftool-2 --type string --set / apps/gnome-terminal/profiles/Profile1/cursor_shape block" endif 基本上我只需要一个命令就可以在urxvt中设置光标,但目前看来不可能。

标签: vim terminal


【解决方案1】:

传统上 DEC 不提供 I 型光标,只是通过DECSCUSR 序列 (CSI Sp q) 提供实心块或下划线:

CSI 1 Sp q  == blinking block
CSI 2 Sp q  == solid block
CSI 3 Sp q  == blinking underbar
CSI 4 Sp q  == solid underbar

最近在xterm我们扩展了这个枚举来定义

CSI 5 Sp q  == blinking vertical bar
CSI 6 Sp q  == solid vertical bar

或许可以建议urxvt采用类似的编码方案。

【讨论】:

  • 似乎很难向 urxvt 提出任何建议...我找不到 github 或看起来像错误报告的地方。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-06-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多