一次跳转多行会导致屏幕上出现奇怪的行为

问题描述 投票:0回答:1

在Vim中,当尝试一次跳过多行时(例如,使用Ggg时,如果我跳到屏幕上当前看不到的地方,则无法正确绘制屏幕上的文本。

旧光标位置的文本填充了新位置周围的空白。

我尝试使用<Esc>:redraw<CR>重新绘制缓冲区无济于事。

我的.vimrc很简单,我认为这不会引起问题。

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

我正在Konsole上使用tmux。

这里是.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'

虽然我已经使用了很长时间了,但这并没有引起任何问题。我还通过etx远程使用该系统。


编辑:

刚刚观察到。当NERDTree在侧面打开时,不会发生此问题。之所以这样说是有道理的,因为只有当我添加NERDTree插件时才会弹出该问题。

vim tmux nerdtree konsole
1个回答
1
投票

如果将default-terminal设置为tmux-256colorscreen-256color并重新启动tmux(tmux kill-server),这仍然会发生吗?确保[tmux中的TERMtmux-256colorscreen-256color

您的Konsole也几岁?这可能是Konsole中的indn错误。在.tmux.conf中尝试此操作,然后重新启动tmux:

set -as terminal-overrides ',*:indn@'
© www.soinside.com 2019 - 2024. All rights reserved.