在gnome-terminal中使用vim怎么才能改变cursor的形状
发表于 : 2010-05-09 22:16
新装了ubuntu10.04在gnome-terminal中使用vim效果还是很不错的就是它的光标在insert和normal下都是一样的实在挺不爽。网上看了一个方法:
au InsertEnter * silent execute "!gconftool-2 -s /apps/gnome-terminal/profiles/Default/cursor_blink_mode -t string off"
au InsertEnter * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam"
au InsertLeave * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape block"
不过是针对gnome-terminal2.26的而10.04中已经是2.29.6了,其实在终端里运行gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam是没有问题的,只是在vim中执行就没有反应了。难道在gnome-terminal下只能很不爽的用vim吗?
au InsertEnter * silent execute "!gconftool-2 -s /apps/gnome-terminal/profiles/Default/cursor_blink_mode -t string off"
au InsertEnter * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam"
au InsertLeave * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape block"
不过是针对gnome-terminal2.26的而10.04中已经是2.29.6了,其实在终端里运行gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam是没有问题的,只是在vim中执行就没有反应了。难道在gnome-terminal下只能很不爽的用vim吗?