gaidink
gaidink

Reputation: 35

VIM: Incorrect cursor position

Recently I have been facing a problem of incorrect display of cursor position in vim editor. The cursor is not displaying at the position it is actually pointing. It is displayed before its apparent position. The position differs according to the level of indentation. It goes like this:

(*) denotes the position of cursor displayed when pointing to the extreme end.

  1. No indentation:

    def example():*

Remark: normal.

  1. First indentation:

    def example(): if i is True:*

Remark: normal

  1. Second indentation:

    def example(): if i is True: print "True*"

Remark: 1 position behind

  1. Third indentation:

    def example(): if i is True: print "True" if j is True: print "j is Tru*e"

Remark: 2 position behind.

...And so on. The measure of error increases as the number of indentation level increases.

What is the cause of this issue? How do I fix it?

Upvotes: 0

Views: 824

Answers (1)

Jeff
Jeff

Reputation: 1222

Looks like this is a reported bug with the indentLine plugin you are using. See https://github.com/Yggdroot/indentLine/issues/94

One suggested fix is to put this in your vimrc

let g:indentLine_noConcealCursor=1

Upvotes: 2

Related Questions