简体   繁体   中英

Jumping multiple lines at once causes weird behaviour on screen

In Vim, when trying to jump multiple lines at once (for example with G or gg ) The on screen text does not get drawn correctly if I am jumping beyond what I can currently see on the screen.

The text from the old cursor position fills up the whitespace around the new location.

I tried redrawing the buffer with <Esc>:redraw<CR> to no avail.

My .vimrc is fairly simple and I don't think that should be causing the issue.

set nocompatible
filetype off

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
        Plugin 'VundleVim/Vundle.vim'
        Plugin 'arcticicestudio/nord-vim'
        Plugin 'preservim/nerdtree'
call vundle#end()
filetype plugin on

colorscheme nord
set relativenumber number
syntax on
set bs=2
set smartindent autoindent

nmap <silent> <F8> :call ToggleDiff()<CR>
function ToggleDiff()
        if(&diff)
                windo diffoff
        else
                windo diffthis
        endif
endfunction

I am using tmux on Konsole.

Here is .tmux.conf

unbind C-b
set-option -g prefix C-a
bind C-a send-prefix
set-window-option -g mode-keys vi

bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
bind -n C-x select-pane -t :.+
bind-key -r -T prefix C-j resize-pane -D 5
bind-key -r -T prefix C-h resize-pane -L 5
bind-key -r -T prefix C-k resize-pane -U 5
bind-key -r -T prefix C-l resize-pane -R 5

# Design changes
set -g default-terminal "xterm-256color"

# Global options
set-option -g allow-rename off

# Nord options
set -g @nord_tmux_no_patched_font "1"

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin "arcticicestudio/nord-tmux"

run -b '~/.tmux/plugins/tpm/tpm'

Also I am using the system remotely through etx, although I have been using that since a long time and that did not cause any issues.


Edit:

Just observed. The issue does not occur when NERDTree is open on the side. This kind of makes sense as the issue popped up only when I added the NERDTree plugin.

Does this still happen if you set default-terminal to tmux-256color or screen-256color and restart tmux ( tmux kill-server )? Make sure TERM is tmux-256color or screen-256color inside tmux.

Also how old is your Konsole? This could be the indn bug in Konsole. Try this in .tmux.conf and restart tmux:

set -as terminal-overrides ',*:indn@'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM