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
  • 21,605
  • 21
  • 56
  • 89
Natjo
  • 329
  • 2
  • 6
  • 18
  • 1
    According to [the current docs of that plugin](https://github.com/jszakmeister/vim-togglecursor/blob/master/doc/togglecursor.txt#L26), it needs VTE > 0.39, which is not available for [any version of Ubuntu](http://packages.ubuntu.com/search?keywords=libvte9). Can you try with any of the other terminal emulators mentioned (`rxvt`, `konsole`)? – muru Dec 13 '15 at 16:21
  • See [this](http://vim.wikia.com/wiki/Configuring_the_cursor) , "Comments "section, after "See also" – Sergiy Kolodyazhnyy Jan 31 '16 at 08:20
  • 1
    Please don't cross-post questions; you already asked it here http://stackoverflow.com/q/34251566/1439843 – Gerhard Burger Jun 21 '16 at 11:48
  • I'm voting to close this question as off-topic because it [has been posted](http://stackoverflow.com/q/34251566/1081936) (and answered) on another site in the SE network. – terdon Jun 21 '16 at 21:33
  • See http://stackoverflow.com/a/42118416/52817 – laktak Feb 08 '17 at 16:24

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

ponsfrilus
  • 586
  • 1
  • 5
  • 15
  • 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