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.

Enlico
  • 2,194
  • 15
  • 31
  • 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 '16 at 07: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 '16 at 08: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 '16 at 08: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 '16 at 08:15
  • That's pretty weird now. Try with another terminal emulator maybe? If the problem isn't reproduced you'll have to find out why your current terminal does that. Unfortunately I have no idea what could cause that. Let's hope someone else can help you :-) – statox Oct 28 '16 at 08:21
  • 1
    What's the output of echo $TERM in your terminal and set term? in Vim? – muru Oct 28 '16 at 08:34
  • @muru, the outputs are xterm-256color and term=xterm-256color. – Enlico Oct 28 '16 at 08:57
  • And you're using a xterm-compatible terminal without any terminal multiplexer? – xaizek Oct 28 '16 at 21:15
  • Well, I've not enough knowledge to understand what do you mean. By the way, I should stress that I never had this problem, neither I changed the terminal, since I just use the "normal" OSX terminal. The most I've done with the terminal options is to change the font. – Enlico Oct 29 '16 at 11:08
  • @xaizek, could you please help me to understand if the problem is about Vim/vi or not? How could I trigger these strange refresh problems if not in Vim? – Enlico Nov 09 '16 at 13:50
  • BTW, I have the problem with both 7.3 (default OS X version) and 8.0.32 (command line MacVim) versions. – Enlico Nov 09 '16 at 13:53
  • I think iTerm is xterm-compatible and if you don't know what terminal multiplexer is, then you're not using it (GNU screen and tmux are probably the most popular ones). It might not be possible to reproduce outside Vim as different applications interact with terminal differently. You can try running TERM=xterm vim to see if it changes anything, but other than that it's hard to tell which one of terminal and vim does something wrong (if you try iTerm2 and vim will work there, it might indicate an issue with iTerm). – xaizek Nov 09 '16 at 14:49
  • With TERM=xterm vim and TERM=xterm vi nothing changes. – Enlico Nov 09 '16 at 15:58
  • try with TERM=vt100 or try with a different terminal. Also you might want to play with different 'terminal' options (see :h 'term') – Christian Brabandt Nov 09 '16 at 17:14
  • Nothing changes. I've also tried to change the font to a "normal" one (some week ago I installed patched fonts for Vim lightline and set one of those fonts), but it doesn't fix the problem (actually the current cursor line is always present, unlike with the patched font, but still there's the "freeze" problem when I go up with k. – Enlico Nov 10 '16 at 07:53
  • Is there no option in Vim which controls refresh rates and concerning stuff? – Enlico Nov 10 '16 at 08:03
  • I'm closing this, as it years old, on a computer I do not have anymore access to, so there's no way to test any type of solution. – Enlico Sep 30 '20 at 07:02

1 Answers1

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?

Danyang Su
  • 81
  • 4