Setting the cursor to a vertical thin line in vim

前端 未结 3 1880
离开以前
离开以前 2021-02-07 06:23

I am trying to set the cursor in insert mode to be a thin vertical line and I am unable to. I have tried this in my .vimrc file:

set guicursor+=i:ver100-iCursor         


        
3条回答
  •  不要未来只要你来
    2021-02-07 06:29

    This code in my /home/el/.vimrc worked for my console:

    if $TERM_PROGRAM =~ "iTerm"
        let &t_SI = "\]50;CursorShape=1\x7" " Vertical bar in insert mode
        let &t_EI = "\]50;CursorShape=0\x7" " Block in normal mode
    endif
    

    Which does this for me:

    Source:

    https://hamberg.no/erlend/posts/2014-03-09-change-vim-cursor-in-iterm.html

提交回复
热议问题