5

I'm used to working on GVim, but I want to make most of vim+tmux too. Therefore I have decided to switch to vim. But in vim the cursor style does not change depending on the mode.

I use zsh and gnome terminal.

I have tried this answer: How to make cursor change from thin line to block based on normal or insert mode in Console Vim on Gnome Terminal

if has("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

but it changes the cursor globally.

I have also tried this plugin, but it hasn't worked either. (How can I check if the plugin is working?)

Artur Meinild
  • 26,018
Natjo
  • 329

1 Answers1

0

Two different options are listed here:

  1. https://stackoverflow.com/questions/34251566/how-can-i-change-the-cursor-style-in-vim-depending-if-im-in-insert-mode-or-norm

  2. https://stackoverflow.com/questions/6488683/how-do-i-change-the-vim-cursor-in-insert-normal-mode

.vimrc files with good comments will help you too, e.g. https://github.com/thoughtbot/dotfiles/blob/master/vimrc

  • While your answer is valid, you should provide the steps here, links and their content can change and then your answer would be a dead end. You still can refer the links as sources. – Videonauth May 11 '16 at 23:46
  • @Videonauth sorry, I was not sure if it could be a duplicate if the question were asked on a site of the same network - so I choose to put the links. I'm waiting 15rep to be able to comment instead of answering. – ponsfrilus May 11 '16 at 23:49
  • @ponsfrilus It's a cross-post, the first question you link is also asked by Jonas, and it (sort of) duplicates the second question you linked. So I flagged for duplicate at SO, and asked for moderator attention on this question. – Gerhard Burger Jun 21 '16 at 11:43
  • yes, I am sorry for that. At the time of posting I did not know those websites are so well connected. I just thought I ask at two places to reach out to more people. – Natjo Jun 21 '16 at 13:33
  • @Jonas No problem, it can happen ;) – Gerhard Burger Jun 24 '16 at 19:05