Users who have just turned to Linux from Windows may have a bad place, that is, the cursor in the terminal and Vim is the width of a character, very coarse, at the time of input it is easy to find the current input characters will appear in the middle of the two characters.
So, in order to have a good eye and a refreshing mind, I looked at how to change the shape of the cursor in the terminal. Here's a summary.
Because my intention was to make Vim's cursor change, so the way to use it is to write some code in the. VIMRC
Method (i)
Add the following code to the current user's./vimrc file. The effect is that all the cursors in the terminal are thinner, which means that both vim Normal mode and insert mode are thin cursors
" makes the terminal cursor a thin line instead of the default thick bar. This normal mode and insert mode in VIM will take effect. Set Gcr=n-v-c:ver25-cursor/lcursor,ve:ver35-cursor,o:hor50-cursor,i-ci:ver25-cursor/lcursor
Method (ii)
Add the following code to the current user's./vimrc file. The effect is that the cursor becomes thinner in VIM's insert mode.
ifHas ("Autocmd") 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"au vimleave* Silent Execute"!gconftool-2--type string--set/apps/gnome-terminal/profiles/default/cursor_shape ibeam"endif
Resources:
Http://blog.sina.com.cn/s/blog_ac9fdc0b0101ol0b.html
http://blog.csdn.net/xiaohui5319/article/details/7507042
Thank the original author very much!
"Notes" Changes the cursor shape of vim or terminal terminal. It looks a lot more refreshed after the cursor becomes thinner!