4

I think this question of mine should be closed, since I do not have access to that computer anymore, so I can't check wheter the answers are effective solutions or not.

I never had this problem, but recently I "lost" my .vimrc file of my Mac and had to use another one from a different computer.

The strange thing, is now that the cursorlines are drawn and remain fixed when I move up with k or , whereas are removed when I move down with j or . (So, moving from downmost line to upmost line I can fill every line with the cursorline, whereas moving from upmost to downmost line I can erase all cursorlines.)

Furthermore

  • Moving with L, M and H, does not affect the behavior.
  • Moving to another buffer with ctrlWctrlW or ctrlk or similars doesn't affect the behavior.
  • Moving to another program with , makes all cursorlines disappear, but those where the cursor is (cursors are, if more than one buffer is visible).
  • Setting cursor column option make the redraw happen only when the movements implies a change in the column of the cursor.

EDIT

I launched Vim with vim -u NONE -U NONE -N (as suggested here) and the problem is still present, so it's not about my .vimrc file.

EDIT 2

(I have not solved the problem yet, so I use set nocul to avoid this persistent lines. I set the option manually, not in my .vimrc file, since I hope I will solve the problem! With your help.) I have news! I noticed that the first time I open a file, no matter how much time I rest with my arms folded, when I start moving (doing some j and then some k I can fill some lines with cursorlines) a "spontaneous" refresh is done after a second (or not much more than a second), then no more.

EDIT 3

When I ssh-connect to the machine on which I have the problem from another one I experience no problem; when I ssh-connect to another computer form the the machine on which I have the problem, I experience the same problem. Thus, it seems to be a problem of the terminal and not Vim.

17
  • 1
    I started Vim using your vimrc but without the plugin part and I can not reproduce your problem. I strongly suggest that you follow the steps in this question to find what is wrong. Also had to use another [vimrc] from a different computer and you have lines saying I don't remember: Don't do that. You'll have less trouble re-creating your vimrc from scratch than using a vimrc that you don't fully understand. And finally on an unrelated note: on line 184 you call the external make command why is that in your vimrc?
    – statox
    Oct 28, 2016 at 7:57
  • Forget my last point about the make command. Your copy-past failed but it is meant to be part of the mapping, The copy simply replaced <CR> by a new line.
    – statox
    Oct 28, 2016 at 8:04
  • I have no problems with the other computer, the .vimrc. Oh, the copy and paste have done a mess, I'm going to edit that part.
    – Enlico
    Oct 28, 2016 at 8:07
  • Oh, this is a surprise: run vim -u NONE -U NONE -N, enter set cul and the problem is still present, so it's not about my .vimrc.
    – Enlico
    Oct 28, 2016 at 8:15
  • 1
    What's the output of echo $TERM in your terminal and set term? in Vim?
    – muru
    Oct 28, 2016 at 8:34

1 Answer 1

3

One dumb solution I find is to type :!clear in vim, but this is just a temporary solution. I am yet to find a better solution. Are you able to fix your issue?

3
  • 1
    Isn't :!clear to run clear in the shell? And no, I haven't find a solution.
    – Enlico
    Mar 3, 2018 at 14:57
  • Yes. But for some reason when you hit enter and go back to vim, things go back to normal. But I don't know why.
    – Danyang Su
    Mar 3, 2018 at 15:02
  • Check my answer to this question. It's an encoding issue it seems.
    – Danyang Su
    Mar 3, 2018 at 15:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.